aboutsummaryrefslogtreecommitdiff
path: root/database/migrations/2020_10_18_142620_create_posts_table.php
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations/2020_10_18_142620_create_posts_table.php')
-rw-r--r--database/migrations/2020_10_18_142620_create_posts_table.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/database/migrations/2020_10_18_142620_create_posts_table.php b/database/migrations/2020_10_18_142620_create_posts_table.php
new file mode 100644
index 0000000..923295d
--- /dev/null
+++ b/database/migrations/2020_10_18_142620_create_posts_table.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreatePostsTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('posts', function (Blueprint $table) {
+ $table->id();
+ $table->string('author', 255)->nullable();
+ $table->longText('text');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('posts');
+ }
+}