Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateTableKelas extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('kelas', function (Blueprint $table) {
- $table->bigIncrements('id_kelas');
- $table->string('nama_kelas',15);
- $table->string('jurusan',100);
- $table->timestamps();
- });
- Schema::table('kelas', function($table) {
- $table->string('lokasi_ruangan', 100)->after('jurusan');
- });
- Schema::table('kelas', function($table) {
- $table->string('lokasi_ruangan', 50)->change();
- $table->string('jurusan', 50)->change();
- });
- Schema::table('kelas', function($table) {
- $table->string('wakel', 100)->after('lokasi_ruangan');
- });
- Schema::table('kelas', function($table) {
- $table->renameColumn('wakel', 'wali_kelas');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('kelas');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement