|
@@ -0,0 +1,64 @@
|
|
|
|
|
+<?php
|
|
|
|
|
+
|
|
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
|
|
+
|
|
|
|
|
+return new class extends Migration
|
|
|
|
|
+{
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Run the migrations.
|
|
|
|
|
+ */
|
|
|
|
|
+ public function up(): void
|
|
|
|
|
+ {
|
|
|
|
|
+ $tables = [
|
|
|
|
|
+ 'pavao_proposals',
|
|
|
|
|
+ 'irrecusable_proposals',
|
|
|
|
|
+ 'pavao_proposal_units',
|
|
|
|
|
+ 'irrecusable_proposal_units',
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ foreach ($tables as $table) {
|
|
|
|
|
+ Schema::table($table, function (Blueprint $table) {
|
|
|
|
|
+ $table->dropColumn([
|
|
|
|
|
+ 'registration_included_in_course',
|
|
|
|
|
+ 'registration_installments_allowed',
|
|
|
|
|
+ 'registration_max_installments',
|
|
|
|
|
+ 'classes_included_in_course',
|
|
|
|
|
+ 'classes_installments_allowed',
|
|
|
|
|
+ 'classes_max_installments',
|
|
|
|
|
+ 'materials_included_in_course',
|
|
|
|
|
+ 'materials_installments_allowed',
|
|
|
|
|
+ 'materials_max_installments',
|
|
|
|
|
+ ]);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Reverse the migrations.
|
|
|
|
|
+ */
|
|
|
|
|
+ public function down(): void
|
|
|
|
|
+ {
|
|
|
|
|
+ $tables = [
|
|
|
|
|
+ 'pavao_proposals',
|
|
|
|
|
+ 'irrecusable_proposals',
|
|
|
|
|
+ 'pavao_proposal_units',
|
|
|
|
|
+ 'irrecusable_proposal_units',
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ foreach ($tables as $tableName) {
|
|
|
|
|
+ Schema::table($tableName, function (Blueprint $table) {
|
|
|
|
|
+ $table->boolean('registration_included_in_course')->default(false);
|
|
|
|
|
+ $table->boolean('registration_installments_allowed')->default(false);
|
|
|
|
|
+ $table->unsignedSmallInteger('registration_max_installments')->default(13);
|
|
|
|
|
+ $table->boolean('classes_included_in_course')->default(false);
|
|
|
|
|
+ $table->boolean('classes_installments_allowed')->default(false);
|
|
|
|
|
+ $table->unsignedSmallInteger('classes_max_installments')->default(13);
|
|
|
|
|
+ $table->boolean('materials_included_in_course')->default(false);
|
|
|
|
|
+ $table->boolean('materials_installments_allowed')->default(false);
|
|
|
|
|
+ $table->unsignedSmallInteger('materials_max_installments')->default(13);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|