From cf52722489518efe833bde7ca17db3f67c23b3bc Mon Sep 17 00:00:00 2001 From: faiqahzaman Date: Thu, 29 Feb 2024 16:33:22 +0800 Subject: [PATCH] migration : add and rename column --- ...11315_rename_student_id_in_voter_table.php | 34 ++++++++++++++++++ ...29_112306_rename_course_in_voter_table.php | 34 ++++++++++++++++++ ...02_29_113327_add_alamat_to_voter_table.php | 34 ++++++++++++++++++ ...2_29_113814_add_telefon_to_voter_table.php | 36 +++++++++++++++++++ ...41929_rename_no_anggota_in_voter_table.php | 34 ++++++++++++++++++ ...9_142817_add_no_anggota_to_voter_table.php | 34 ++++++++++++++++++ 6 files changed, 206 insertions(+) create mode 100644 database/migrations/2024_02_29_111315_rename_student_id_in_voter_table.php create mode 100644 database/migrations/2024_02_29_112306_rename_course_in_voter_table.php create mode 100644 database/migrations/2024_02_29_113327_add_alamat_to_voter_table.php create mode 100644 database/migrations/2024_02_29_113814_add_telefon_to_voter_table.php create mode 100644 database/migrations/2024_02_29_141929_rename_no_anggota_in_voter_table.php create mode 100644 database/migrations/2024_02_29_142817_add_no_anggota_to_voter_table.php diff --git a/database/migrations/2024_02_29_111315_rename_student_id_in_voter_table.php b/database/migrations/2024_02_29_111315_rename_student_id_in_voter_table.php new file mode 100644 index 0000000..f9868ad --- /dev/null +++ b/database/migrations/2024_02_29_111315_rename_student_id_in_voter_table.php @@ -0,0 +1,34 @@ +renameColumn('student_id', 'no_kp'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->renameColumn('student_id', 'no_kp'); + }); + } +} diff --git a/database/migrations/2024_02_29_112306_rename_course_in_voter_table.php b/database/migrations/2024_02_29_112306_rename_course_in_voter_table.php new file mode 100644 index 0000000..b3d921d --- /dev/null +++ b/database/migrations/2024_02_29_112306_rename_course_in_voter_table.php @@ -0,0 +1,34 @@ +renameColumn('course', 'unit'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->renameColumn('course', 'unit'); + }); + } +} diff --git a/database/migrations/2024_02_29_113327_add_alamat_to_voter_table.php b/database/migrations/2024_02_29_113327_add_alamat_to_voter_table.php new file mode 100644 index 0000000..50dec2f --- /dev/null +++ b/database/migrations/2024_02_29_113327_add_alamat_to_voter_table.php @@ -0,0 +1,34 @@ +string('alamat'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->string('alamat'); + }); + } +} diff --git a/database/migrations/2024_02_29_113814_add_telefon_to_voter_table.php b/database/migrations/2024_02_29_113814_add_telefon_to_voter_table.php new file mode 100644 index 0000000..39bfca4 --- /dev/null +++ b/database/migrations/2024_02_29_113814_add_telefon_to_voter_table.php @@ -0,0 +1,36 @@ +string('telefon'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + // + $table->string('telefon'); + }); + } +} diff --git a/database/migrations/2024_02_29_141929_rename_no_anggota_in_voter_table.php b/database/migrations/2024_02_29_141929_rename_no_anggota_in_voter_table.php new file mode 100644 index 0000000..c63c5eb --- /dev/null +++ b/database/migrations/2024_02_29_141929_rename_no_anggota_in_voter_table.php @@ -0,0 +1,34 @@ +renameColumn('no_kp', 'no_kp'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->renameColumn('no_kp', 'no_kp'); + }); + } +} diff --git a/database/migrations/2024_02_29_142817_add_no_anggota_to_voter_table.php b/database/migrations/2024_02_29_142817_add_no_anggota_to_voter_table.php new file mode 100644 index 0000000..fff62e2 --- /dev/null +++ b/database/migrations/2024_02_29_142817_add_no_anggota_to_voter_table.php @@ -0,0 +1,34 @@ +string('no_anggota', 60); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->string('no_anggota', 60); + }); + } +}