aboutsummaryrefslogtreecommitdiffhomepage
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/.gitignore1
-rw-r--r--database/factories/ModelFactory.php21
-rw-r--r--database/migrations/.gitkeep1
-rw-r--r--database/migrations/2014_10_12_000000_create_users_table.php34
-rw-r--r--database/migrations/2014_10_12_100000_create_password_resets_table.php35
-rw-r--r--database/migrations/2018_08_21_102348_create_post_types_table.php31
-rw-r--r--database/migrations/2018_08_22_102141_create_posts_table.php41
-rw-r--r--database/migrations/2018_08_23_231531_create_text_posts_table.php36
-rw-r--r--database/migrations/2018_08_23_232015_create_media_posts_table.php37
-rw-r--r--database/seeds/.gitkeep1
-rw-r--r--database/seeds/DatabaseSeeder.php16
-rw-r--r--database/seeds/PostTypesTableSeeder.php23
12 files changed, 0 insertions, 277 deletions
diff --git a/database/.gitignore b/database/.gitignore
deleted file mode 100644
index 9b1dffd..0000000
--- a/database/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.sqlite
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
deleted file mode 100644
index c0e4686..0000000
--- a/database/factories/ModelFactory.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-/*
-|--------------------------------------------------------------------------
-| Model Factories
-|--------------------------------------------------------------------------
-|
-| Here you may define all of your model factories. Model factories give
-| you a convenient way to create models for testing and seeding your
-| database. Just tell the factory how a default model should look.
-|
-*/
-
-$factory->define(Api\Users\Model\User::class, function (Faker\Generator $faker) {
- return [
- 'name' => $faker->name,
- 'email' => $faker->safeEmail,
- 'password' => bcrypt(str_random(10)),
- 'remember_token' => str_random(10),
- ];
-});
diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep
deleted file mode 100644
index 8b13789..0000000
--- a/database/migrations/.gitkeep
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php
deleted file mode 100644
index 59aa01a..0000000
--- a/database/migrations/2014_10_12_000000_create_users_table.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class CreateUsersTable extends Migration
-{
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('users', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name');
- $table->string('email')->unique();
- $table->string('password');
- $table->rememberToken();
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('users');
- }
-}
diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php
deleted file mode 100644
index a7dbd73..0000000
--- a/database/migrations/2014_10_12_100000_create_password_resets_table.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class CreatePasswordResetsTable extends Migration
-{
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('password_resets', function (Blueprint $table) {
- $table->string('email')->index();
- $table->string('token')->index();
- $table->timestamp('created_at');
-
- $table->foreign('email')
- ->references('email')
- ->on('users');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('password_resets');
- }
-}
diff --git a/database/migrations/2018_08_21_102348_create_post_types_table.php b/database/migrations/2018_08_21_102348_create_post_types_table.php
deleted file mode 100644
index 0b804de..0000000
--- a/database/migrations/2018_08_21_102348_create_post_types_table.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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')->unique();
- $table->string('type');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('post_types');
- }
-}
diff --git a/database/migrations/2018_08_22_102141_create_posts_table.php b/database/migrations/2018_08_22_102141_create_posts_table.php
deleted file mode 100644
index 6154ca8..0000000
--- a/database/migrations/2018_08_22_102141_create_posts_table.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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('posts', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('post_types_id')->unsigned();
- $table->integer('user_id')->unsigned();
- $table->timestamps();
-
- $table->foreign('user_id')
- ->references('id')
- ->on('users');
-
- $table->foreign('post_types_id')
- ->references('id')
- ->on('post_types');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('posts');
- }
-}
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
deleted file mode 100644
index 26860ae..0000000
--- a/database/migrations/2018_08_23_231531_create_text_posts_table.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreateTextPostsTable extends Migration
-{
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('text_posts', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('post_id')->unsigned()->unique();
- $table->string('text', 8192);
-
- $table->foreign('post_id')
- ->references('id')
- ->on('posts');
- });
- }
-
- /**
- * 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
deleted file mode 100644
index 6a7e0e2..0000000
--- a/database/migrations/2018_08_23_232015_create_media_posts_table.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class CreateMediaPostsTable extends Migration
-{
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('media_posts', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('post_id')->unsigned()->unique();
- $table->string('description');
- $table->string('media_path');
-
- $table->foreign('post_id')
- ->references('id')
- ->on('posts');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('media_posts');
- }
-}
diff --git a/database/seeds/.gitkeep b/database/seeds/.gitkeep
deleted file mode 100644
index 8b13789..0000000
--- a/database/seeds/.gitkeep
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
deleted file mode 100644
index 927bf94..0000000
--- a/database/seeds/DatabaseSeeder.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-
-class DatabaseSeeder extends Seeder
-{
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->call(PostTypesTableSeeder::class);
- }
-}
diff --git a/database/seeds/PostTypesTableSeeder.php b/database/seeds/PostTypesTableSeeder.php
deleted file mode 100644
index d21770b..0000000
--- a/database/seeds/PostTypesTableSeeder.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-use Illuminate\Database\Seeder;
-use Illuminate\Database\Eloquent\Model;
-
-class PostTypesTableSeeder extends Seeder
-{
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- DB::table('post_types')->insert([
- 'type' => 'Media'
- ]);
-
- DB::table('post_types')->insert([
- 'type' => 'Text'
- ]);
- }
-}