0% found this document useful (0 votes)
35 views

Create Table

The document defines the schema for multiple database tables, including tables for items, categories, transactions, and users. Primary keys and column datatypes are specified for each table.

Uploaded by

Wenggar Tyasari
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Create Table

The document defines the schema for multiple database tables, including tables for items, categories, transactions, and users. Primary keys and column datatypes are specified for each table.

Uploaded by

Wenggar Tyasari
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CREATE TABLE `barang` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`nama` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`barcode` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`stok` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`hargaBeli` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`hargaJual` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`id_kategori` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Table structure for table `detail_barang`

--

CREATE TABLE `detail_barang` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`id_barang` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`stok_awal` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`stok_keluar` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`status` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Table structure for table `dettrans_beli`

CREATE TABLE `dettrans_beli` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`id_transbeli` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`id_barang` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`jumlah` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,


`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Table structure for table `dettrans_jual`

--

CREATE TABLE `dettrans_jual` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`id_transjual` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`id_barang` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`jumlah` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Table structure for table `kategori`

--

CREATE TABLE `kategori` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`nama` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Table structure for table `migrations`

--

CREATE TABLE `migrations` (

`id` INT(10) UNSIGNED NOT NULL,

`migration` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`batch` INT(11) NOT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- Dumping data for table `migrations`

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES

(1, '2014_10_12_000000_create_users_table', 1),

(2, '2014_10_12_100000_create_password_resets_table', 1);

--

-- Table structure for table `password_resets`

--

CREATE TABLE `password_resets` (

`email` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`token` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `password_resets`

--

INSERT INTO `password_resets` (`email`, `token`, `created_at`) VALUES

('[email protected]', '$2y$10$Mx/d5niGTl9eAjp4g1fgpe4ElEPpi/ryTHf2eUaDQWzOaF1xZMopG', '2020-01-28


05:48:26');

--

-- Table structure for table `trans_beli`

--

CREATE TABLE `trans_beli` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`id_user` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`status` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `trans_jual`

--

CREATE TABLE `trans_jual` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`id_user` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`status` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`status_trans` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--

-- Dumping data for table `trans_jual`

--

INSERT INTO `trans_jual` (`id`, `id_user`, `status`, `status_trans`, `remember_token`, `created_at`, `updated_at`) VALUES

(1, 'Null', '0', '0', NULL, '2020-01-28 12:26:13', '2020-01-28 12:26:13');

-- Table structure for table `users`

CREATE TABLE `users` (

`id` BIGINT(20) UNSIGNED NOT NULL,

`name` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`email` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`email_verified_at` TIMESTAMP NULL DEFAULT NULL,

`password` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL,

`remember_token` VARCHAR(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,

`created_at` TIMESTAMP NULL DEFAULT NULL,

`updated_at` TIMESTAMP NULL DEFAULT NULL

) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `users`

--

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`)
VALUES

(2, 'Rafi Wibawa Aruan', '[email protected]', NULL,


'$2y$10$3nUc53O1VVlRuSg8/7/Y5eGg94cljKAweTtKdUEiRbwzKimEZpOe6', NULL, '2020-01-29 06:08:43', '2020-01-
29 06:08:43');

You might also like