This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
memberdb/database/migrations/2017_07_23_000001_create_currency_table.php

42 lines
886 B
PHP
Raw Permalink Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCurrencyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->integer('country_id')->nullable();
$table->string('name', 128)->nullable();
$table->boolean('active')->nullable();
$table->text('convert_array')->nullable();
$table->string('notes', 128)->nullable();
$table->string('symbol', 16)->nullable();
$table->string('three_digit', 3)->nullable()->unique();
$table->foreign('country_id')->references('id')->on('country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('currency');
}
}