diff options
author | Chaoyi Zha <summermontreal@gmail.com> | 2017-02-11 02:05:41 +0300 |
---|---|---|
committer | Chaoyi Zha <summermontreal@gmail.com> | 2017-02-11 02:05:41 +0300 |
commit | a9a9909e34257f70b85d0de979fd32d50e886c52 (patch) | |
tree | 286f171d1d6f282512453c6e386a578f5ee92835 /database | |
parent | 5c2ff762de493132c6f8ce19ec74a8e467895751 (diff) | |
parent | 6e361826f965ec288468fdb0c9003553ce2b36c5 (diff) |
Merge branch 'link_table_indexes' of github.com:cydrobolt/polr into link_table_indexeslink_table_indexes
Diffstat (limited to 'database')
-rw-r--r-- | database/migrations/2017_02_08_003907_alter_link_clicks_to_integer.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/database/migrations/2017_02_08_003907_alter_link_clicks_to_integer.php b/database/migrations/2017_02_08_003907_alter_link_clicks_to_integer.php new file mode 100644 index 0000000..9879d67 --- /dev/null +++ b/database/migrations/2017_02_08_003907_alter_link_clicks_to_integer.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class AlterLinkClicksToInteger extends Migration +{ + /** + * Run the migrations. + * Changes the "clicks" field in the link table to + * an integer field rather than a string field. + * + * @return void + */ + public function up() + { + Schema::table('links', function (Blueprint $table) + { + $table->integer('clicks')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('links', function (Blueprint $table) + { + $table->string('clicks')->change(); + }); + } +} |