Skip to content

Commit

Permalink
dropForeign conditionnaly to sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Siffer committed Apr 19, 2023
1 parent e0edba8 commit ef82e7e
Show file tree
Hide file tree
Showing 51 changed files with 345 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('activity_operation', function (Blueprint $table) {
$table->dropForeign('activity_id_fk_1472704');
$table->dropForeign('operation_id_fk_1472704');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('activity_id_fk_1472704');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('operation_id_fk_1472704');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('activity_process', function (Blueprint $table) {
$table->dropForeign('activity_id_fk_1627616');
$table->dropForeign('process_id_fk_1627616');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('activity_id_fk_1627616');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('process_id_fk_1627616');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('actor_operation', function (Blueprint $table) {
$table->dropForeign('actor_id_fk_1472680');
$table->dropForeign('operation_id_fk_1472680');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('actor_id_fk_1472680');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('operation_id_fk_1472680');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function up()
public function down()
{
Schema::table('annuaires', function (Blueprint $table) {
$table->dropForeign('zone_admin_fk_1482666');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('zone_admin_fk_1482666');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('application_module_application_service', function (Blueprint $table) {
$table->dropForeign('application_module_id_fk_1492414');
$table->dropForeign('application_service_id_fk_1492414');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_module_id_fk_1492414');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_service_id_fk_1492414');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('application_service_m_application', function (Blueprint $table) {
$table->dropForeign('application_service_id_fk_1482585');
$table->dropForeign('m_application_id_fk_1482585');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_service_id_fk_1482585');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('m_application_id_fk_1482585');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('bay_wifi_terminal', function (Blueprint $table) {
$table->dropForeign('bay_id_fk_1485509');
$table->dropForeign('wifi_terminal_id_fk_1485509');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('bay_id_fk_1485509');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('wifi_terminal_id_fk_1485509');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function up()
public function down()
{
Schema::table('bays', function (Blueprint $table) {
$table->dropForeign('room_fk_1483441');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('room_fk_1483441');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function up()
public function down()
{
Schema::table('buildings', function (Blueprint $table) {
$table->dropForeign('site_fk_1483431');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('site_fk_1483431');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('database_entity', function (Blueprint $table) {
$table->dropForeign('database_id_fk_1485563');
$table->dropForeign('entity_id_fk_1485563');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('database_id_fk_1485563');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('entity_id_fk_1485563');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('database_information', function (Blueprint $table) {
$table->dropForeign('database_id_fk_1485570');
$table->dropForeign('information_id_fk_1485570');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('database_id_fk_1485570');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('information_id_fk_1485570');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('database_m_application', function (Blueprint $table) {
$table->dropForeign('database_id_fk_1482586');
$table->dropForeign('m_application_id_fk_1482586');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('database_id_fk_1482586');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('m_application_id_fk_1482586');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function up()
public function down()
{
Schema::table('databases', function (Blueprint $table) {
$table->dropForeign('entity_resp_fk_1485569');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('entity_resp_fk_1485569');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('domaine_ad_forest_ad', function (Blueprint $table) {
$table->dropForeign('domaine_ad_id_fk_1492084');
$table->dropForeign('forest_ad_id_fk_1492084');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('domaine_ad_id_fk_1492084');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('forest_ad_id_fk_1492084');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('entity_m_application', function (Blueprint $table) {
$table->dropForeign('entity_id_fk_1488611');
$table->dropForeign('m_application_id_fk_1488611');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('entity_id_fk_1488611');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('m_application_id_fk_1488611');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('entity_process', function (Blueprint $table) {
$table->dropForeign('entity_id_fk_1627958');
$table->dropForeign('process_id_fk_1627958');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('entity_id_fk_1627958');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('process_id_fk_1627958');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('external_connected_entity_network', function (Blueprint $table) {
$table->dropForeign('external_connected_entity_id_fk_1483344');
$table->dropForeign('network_id_fk_1483344');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('external_connected_entity_id_fk_1483344');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('network_id_fk_1483344');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,30 @@ public function up()
public function down()
{
Schema::table('fluxes', function (Blueprint $table) {
$table->dropForeign('application_dest_fk_1485549');
$table->dropForeign('application_source_fk_1485545');
$table->dropForeign('database_dest_fk_1485552');
$table->dropForeign('database_source_fk_1485548');
$table->dropForeign('module_dest_fk_1485551');
$table->dropForeign('module_source_fk_1485547');
$table->dropForeign('service_dest_fk_1485550');
$table->dropForeign('service_source_fk_1485546');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_dest_fk_1485549');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_source_fk_1485545');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('database_dest_fk_1485552');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('database_source_fk_1485548');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('module_dest_fk_1485551');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('module_source_fk_1485547');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('service_dest_fk_1485550');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('service_source_fk_1485546');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function up()
public function down()
{
Schema::table('forest_ads', function (Blueprint $table) {
$table->dropForeign('zone_admin_fk_1482667');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('zone_admin_fk_1482667');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('information_process', function (Blueprint $table) {
$table->dropForeign('information_id_fk_1473025');
$table->dropForeign('process_id_fk_1473025');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('information_id_fk_1473025');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('process_id_fk_1473025');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('lan_man', function (Blueprint $table) {
$table->dropForeign('lan_id_fk_1490345');
$table->dropForeign('man_id_fk_1490345');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('lan_id_fk_1490345');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('man_id_fk_1490345');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('lan_wan', function (Blueprint $table) {
$table->dropForeign('lan_id_fk_1490368');
$table->dropForeign('wan_id_fk_1490368');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('lan_id_fk_1490368');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('wan_id_fk_1490368');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('logical_server_m_application', function (Blueprint $table) {
$table->dropForeign('logical_server_id_fk_1488616');
$table->dropForeign('m_application_id_fk_1488616');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('logical_server_id_fk_1488616');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('m_application_id_fk_1488616');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('logical_server_physical_server', function (Blueprint $table) {
$table->dropForeign('logical_server_id_fk_1657961');
$table->dropForeign('physical_server_id_fk_1657961');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('logical_server_id_fk_1657961');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('physical_server_id_fk_1657961');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('m_application_process', function (Blueprint $table) {
$table->dropForeign('m_application_id_fk_1482573');
$table->dropForeign('process_id_fk_1482573');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('m_application_id_fk_1482573');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('process_id_fk_1482573');
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ public function up()
public function down()
{
Schema::table('m_applications', function (Blueprint $table) {
$table->dropForeign('application_block_fk_1644592');
$table->dropForeign('entity_resp_fk_1488612');
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('application_block_fk_1644592');
}
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign('entity_resp_fk_1488612');
}
});
}
}
Loading

0 comments on commit ef82e7e

Please sign in to comment.