更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
34
database/migrations/2018_07_28_175045_create_Bank_table.php
Normal file
34
database/migrations/2018_07_28_175045_create_Bank_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBankTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Bank', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('ID', true);
|
||||
$table->string('BankNum', 3);
|
||||
$table->string('BankName', 10);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Bank');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user