Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Support\Facades\Schema;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Database\Migrations\Migration;
  6.  
  7. class CreateBeliCashTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('beli_cash', function(Blueprint $table){
  17. $table->string('kode_cash')->primary();
  18. $table->string('ktp');
  19. $table->foreign('ktp')->references('ktp')->on('pembeli');
  20. $table->string('kode_mobil');
  21. $table->foreign('kode_mobil')->references('kode_mobil')->on('mobil');
  22. $table->string('cash_tgl');
  23. $table->string('cash_bayar');
  24. $table->timestamps();
  25. });
  26. }
  27.  
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::drop('beli_cash');
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement