Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateBeliCashTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('beli_cash', function(Blueprint $table){
- $table->string('kode_cash')->primary();
- $table->string('ktp');
- $table->foreign('ktp')->references('ktp')->on('pembeli');
- $table->string('kode_mobil');
- $table->foreign('kode_mobil')->references('kode_mobil')->on('mobil');
- $table->string('cash_tgl');
- $table->string('cash_bayar');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('beli_cash');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement