Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move migrations para futura organização #989

Merged
merged 17 commits into from
Dec 23, 2024
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ public function boot()
if ($this->app->runningInConsole()) {
$this->loadMigrationsFrom([
database_path('migrations/addressing'),
database_path('migrations/audit'),
database_path('migrations/educacenso'),
database_path('migrations/exporter'),
database_path('migrations/misc'),
database_path('migrations/remove'),
database_path('migrations/report'),
database_path('migrations/table'),
]);
$this->loadLegacyMigrations();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record20-2020-04-13.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record40');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record40-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record40-2020-04-13.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record50');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record50-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record50-2020-04-13.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record60');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record60-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record60-2020-04-13.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UpdateDuplicateCollegeEducacenso extends Migration
public function up()
{
DB::unprepared(
file_get_contents(__DIR__ . '/../sqls/educacenso/2020_instituicoes_ensino.sql')
file_get_contents(database_path('sqls/educacenso/2020_instituicoes_ensino.sql'))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record50');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record50-2022-05-25.sql'
database_path('sqls/views/public.educacenso_record50-2022-05-25.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record50');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record50-2022-05-25.sql'
database_path('sqls/views/public.educacenso_record50-2022-05-25.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2022-05-19.sql'
database_path('sqls/views/public.educacenso_record20-2022-05-19.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record20-2020-04-13.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record60');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record60-2022-05-26.sql'
database_path('sqls/views/public.educacenso_record60-2022-05-26.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record60');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record60-2020-04-13.sql'
database_path('sqls/views/public.educacenso_record60-2020-04-13.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2022-06-17.sql'
database_path('sqls/views/public.educacenso_record20-2022-06-17.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2022-05-19.sql'
database_path('sqls/views/public.educacenso_record20-2022-05-19.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2023-05-11.sql'
database_path('sqls/views/public.educacenso_record20-2023-05-11.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record20');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record20-2022-06-17.sql'
database_path('sqls/views/public.educacenso_record20-2022-06-17.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record60');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record60-2023-05-17.sql'
database_path('sqls/views/public.educacenso_record60-2023-05-17.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record60');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record60-2022-07-26.sql'
database_path('sqls/views/public.educacenso_record60-2022-07-26.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.educacenso_record50');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record50-2023-05-17.sql'
database_path('sqls/views/public.educacenso_record50-2023-05-17.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.educacenso_record50');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.educacenso_record50-2022-05-25.sql'
database_path('sqls/views/public.educacenso_record50-2022-05-25.sql')
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_person');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_person-2020-04-01.sql'
database_path('sqls/views/public.exporter_person-2020-04-01.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_disabilities');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_disabilities-2020-04-01.sql'
database_path('sqls/views/public.exporter_disabilities-2020-04-01.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_phones');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_phones-2020-04-01.sql'
database_path('sqls/views/public.exporter_phones-2020-04-01.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-01.sql'
database_path('sqls/views/public.exporter_student-2020-04-01.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_benefits');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_benefits-2020-04-01.sql'
database_path('sqls/views/public.exporter_benefits-2020-04-01.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-03.sql'
database_path('sqls/views/public.exporter_student-2020-04-03.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_teacher');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_teacher-2020-04-07.sql'
database_path('sqls/views/public.exporter_teacher-2020-04-07.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_teacher_disciplines');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_teacher_disciplines-2020-04-07.sql'
database_path('sqls/views/public.exporter_teacher_disciplines-2020-04-07.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public function up()
$this->dropView('public.exporter_person');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_person-2020-04-16.sql'
database_path('sqls/views/public.exporter_person-2020-04-16.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-03.sql'
database_path('sqls/views/public.exporter_student-2020-04-03.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_teacher-2020-04-07.sql'
database_path('sqls/views/public.exporter_teacher-2020-04-07.sql')
);
}

Expand All @@ -43,15 +43,15 @@ public function down()
$this->dropView('public.exporter_person');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_person-2020-04-01.sql'
database_path('sqls/views/public.exporter_person-2020-04-01.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-03.sql'
database_path('sqls/views/public.exporter_student-2020-04-03.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_teacher-2020-04-07.sql'
database_path('sqls/views/public.exporter_teacher-2020-04-07.sql')
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-17.sql'
database_path('sqls/views/public.exporter_student-2020-04-17.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-03.sql'
database_path('sqls/views/public.exporter_student-2020-04-03.sql')
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-17.sql'
database_path('sqls/views/public.exporter_student-2020-04-17.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-03.sql'
database_path('sqls/views/public.exporter_student-2020-04-03.sql')
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-22.sql'
database_path('sqls/views/public.exporter_student-2020-04-22.sql')
);
}

Expand All @@ -31,7 +31,7 @@ public function down()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-17.sql'
database_path('sqls/views/public.exporter_student-2020-04-17.sql')
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->dropView('public.exporter_social_assistance');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_social_assistance-2020-04-24.sql'
database_path('sqls/views/public.exporter_social_assistance-2020-04-24.sql')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public function up()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-05-05.sql'
database_path('sqls/views/public.exporter_student-2020-05-05.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_social_assistance-2020-05-05.sql'
database_path('sqls/views/public.exporter_social_assistance-2020-05-05.sql')
);
}

Expand All @@ -37,11 +37,11 @@ public function down()
$this->dropView('public.exporter_student');

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_student-2020-04-22.sql'
database_path('sqls/views/public.exporter_student-2020-04-22.sql')
);

$this->executeSqlFile(
__DIR__ . '/../sqls/views/public.exporter_social_assistance-2020-04-24.sql'
database_path('sqls/views/public.exporter_social_assistance-2020-04-24.sql')
);
}
}
Loading
Loading