1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-13 21:52:29 +01:00
polr/database/migrations/2015_11_04_015813_create_link_table.php

47 lines
1.0 KiB
PHP
Raw Normal View History

2015-11-04 02:59:39 +01:00
<?php
use Illuminate\Support\Facades\Schema;
2015-11-04 02:59:39 +01:00
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLinkTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('links', function(Blueprint $table)
{
$table->engine = 'InnoDB';
2015-11-04 02:59:39 +01:00
$table->increments('id');
$table->string('short_url');
$table->longText('long_url');
2015-11-04 02:59:39 +01:00
$table->string('ip');
$table->string('creator');
2015-12-28 22:33:17 +01:00
$table->string('clicks')->default(0);
2015-11-04 02:59:39 +01:00
$table->string('secret_key');
2015-12-28 22:33:17 +01:00
$table->boolean('is_disabled')->default(0);
$table->boolean('is_custom')->default(0);
$table->boolean('is_api')->default(0);
2015-11-04 02:59:39 +01:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('links');
2015-11-04 02:59:39 +01:00
}
}