Advertisement
fadlyshafa

Untitled

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