D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
test
/
database
/
migrations
/
Filename :
2017_08_09_105821_create_orders_table.php
back
Copy
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Eloquent\Model; class CreateOrdersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Model::unguard(); Schema::create('orders',function(Blueprint $table){ $table->increments("id"); $table->integer("user_id")->references("id")->on("user")->nullable(); $table->integer('manager_id'); $table->string("width")->nullable(); $table->string("height")->nullable(); $table->string("size")->nullable(); $table->integer("catalogs_id")->references("id")->on("catalogs")->nullable(); $table->integer("saloon_id")->references("id")->on("saloons")->nullable(); $table->integer("artist_id")->references("id")->on("artist")->nullable(); $table->string("picture")->nullable(); $table->string("picture_data")->nullable(); $table->string("price")->nullable(); $table->string("putdate")->nullable(); $table->string("putdate_end")->nullable(); $table->string("body")->nullable(); $table->string("status")->nullable(); $table->enum("type", ["client", "manager_change", "manager_new"])->default("client"); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('orders'); } }