1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 15:11:40 +02:00
polr/database/migrations/2017_02_08_003907_alter_link_clicks_to_integer.php

36 lines
736 B
PHP

<?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();
});
}
}