summaryrefslogtreecommitdiff
path: root/src/products/database/migrations/2020_10_01_182914_products_table_create.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/products/database/migrations/2020_10_01_182914_products_table_create.php')
-rw-r--r--src/products/database/migrations/2020_10_01_182914_products_table_create.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/products/database/migrations/2020_10_01_182914_products_table_create.php b/src/products/database/migrations/2020_10_01_182914_products_table_create.php
new file mode 100644
index 0000000..d747693
--- /dev/null
+++ b/src/products/database/migrations/2020_10_01_182914_products_table_create.php
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class ProductsTableCreate extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('products', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('name');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('products');
+ }
+}