aboutsummaryrefslogtreecommitdiffhomepage
path: root/database/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations')
-rw-r--r--database/migrations/2018_08_23_231531_create_text_posts_table.php31
-rw-r--r--database/migrations/2018_08_23_232015_create_media_posts_table.php32
-rw-r--r--database/migrations/2018_08_24_102141_create_posts_table.php33
-rw-r--r--database/migrations/2018_08_24_102348_create_post_types_table.php31
4 files changed, 127 insertions, 0 deletions
diff --git a/database/migrations/2018_08_23_231531_create_text_posts_table.php b/database/migrations/2018_08_23_231531_create_text_posts_table.php
new file mode 100644
index 0000000..128cfc6
--- /dev/null
+++ b/database/migrations/2018_08_23_231531_create_text_posts_table.php
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePostsTextTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('text_posts', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('text', 8192);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('text_posts');
+ }
+}
diff --git a/database/migrations/2018_08_23_232015_create_media_posts_table.php b/database/migrations/2018_08_23_232015_create_media_posts_table.php
new file mode 100644
index 0000000..d652a50
--- /dev/null
+++ b/database/migrations/2018_08_23_232015_create_media_posts_table.php
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePostsImageTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('media_posts', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('description');
+ $table->string('media_path');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('media_posts');
+ }
+}
diff --git a/database/migrations/2018_08_24_102141_create_posts_table.php b/database/migrations/2018_08_24_102141_create_posts_table.php
new file mode 100644
index 0000000..f841c69
--- /dev/null
+++ b/database/migrations/2018_08_24_102141_create_posts_table.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePostsTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('text_posts', function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('post_types_id');
+ $table->integer('user_id');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('text_posts');
+ }
+}
diff --git a/database/migrations/2018_08_24_102348_create_post_types_table.php b/database/migrations/2018_08_24_102348_create_post_types_table.php
new file mode 100644
index 0000000..76f0370
--- /dev/null
+++ b/database/migrations/2018_08_24_102348_create_post_types_table.php
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePostTypesTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('post_types', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('type');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('post_types');
+ }
+}