fadlyshafa

Untitled

Jan 15th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. ....
  2. public function up()
  3.     {
  4.         Schema::create('t_pesanan', function (Blueprint $table) {
  5.             $table->string('id',40);
  6.             $table->string('customer',40);
  7.             $table->string('paket',40);
  8.             $table->integer('berat');
  9.             $table->integer('grand_total');
  10.             $table->string('status_pesanan',40);
  11.             $table->string('status_pembayaran',40);
  12.             $table->timestamps();
  13.  
  14.             $table->primary('id');
  15.             $table->foreign('customer')->references('id')->on('customer')->onDelete('restrict');
  16.             $table->foreign('paket')->references('id')->on('paket')->onDelete('restrict');
  17.             $table->foreign('status_pesanan')->references('id')->on('status_pesanan')->onDelete('restrict');
  18.             $table->foreign('status_pembayaran')->references('id')->on('status_pembayaran')->onDelete('restrict');
  19.             $table->engine = 'InnoDB';
  20.  
  21.         });
  22.     }
  23. ....
Add Comment
Please, Sign In to add comment