From 2cbece9234df56dd620c5e09a2c185d58c6e4b60 Mon Sep 17 00:00:00 2001 From: Mateus Junges Date: Fri, 13 Mar 2020 13:30:33 -0300 Subject: [PATCH] Change descritpion field to a new migration and adds a test script to composer.json --- composer.json | 7 ++++-- .../2014_01_07_073615_create_tags_table.php | 1 - ...3_083515_add_description_to_tags_table.php | 23 +++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 migrations/2020_03_13_083515_add_description_to_tags_table.php diff --git a/composer.json b/composer.json index d6bf685..773087a 100644 --- a/composer.json +++ b/composer.json @@ -38,5 +38,8 @@ ] } }, - "minimum-stability": "dev" -} \ No newline at end of file + "minimum-stability": "dev", + "scripts": { + "test": "./vendor/bin/phpunit tests" + } +} diff --git a/migrations/2014_01_07_073615_create_tags_table.php b/migrations/2014_01_07_073615_create_tags_table.php index 12d922b..1a3a747 100644 --- a/migrations/2014_01_07_073615_create_tags_table.php +++ b/migrations/2014_01_07_073615_create_tags_table.php @@ -11,7 +11,6 @@ public function up() $table->increments('id'); $table->string('slug', 125)->index(); $table->string('name', 125); - $table->text('description')->nullable(); $table->boolean('suggest')->default(false); $table->integer('count')->unsigned()->default(0); // count of how many times this tag was used $table->integer('tag_group_id')->unsigned()->nullable(); diff --git a/migrations/2020_03_13_083515_add_description_to_tags_table.php b/migrations/2020_03_13_083515_add_description_to_tags_table.php new file mode 100644 index 0000000..b11ed68 --- /dev/null +++ b/migrations/2020_03_13_083515_add_description_to_tags_table.php @@ -0,0 +1,23 @@ +text('description')->nullable(); + }); + + } + + + public function down() + { + Schema::table('tags', function ($table) { + $table->dropColumn('description'); + }); + } +}