-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from Vizzuality/fix/cms/issue-with-docker-and…
…-volumes Fix/cms/issue with docker and volumes
- Loading branch information
Showing
6 changed files
with
87 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
cms/database/migrations/2023.12.15T11.00.00.create_postgis_extension.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
async up(knex) { | ||
// create postgis extension in the data schema | ||
await knex.raw('CREATE EXTENSION postgis SCHEMA data'); | ||
}, | ||
}; | ||
async up(knex) { | ||
// create postgis extension in the data schema | ||
await knex.raw("CREATE EXTENSION IF NOT EXISTS postgis SCHEMA data"); | ||
}, | ||
}; |
12 changes: 6 additions & 6 deletions
12
cms/database/migrations/2023.12.19T10.00.00.move_postgis_extension_to_public.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
async up(knex) { | ||
// create postgis extension in the data schema | ||
await knex.raw('DROP EXTENSION IF EXISTS postgis CASCADE'); | ||
await knex.raw('CREATE EXTENSION postgis SCHEMA public'); | ||
}, | ||
} | ||
async up(knex) { | ||
// create postgis extension in the data schema | ||
await knex.raw("DROP EXTENSION IF EXISTS postgis CASCADE"); | ||
await knex.raw("CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public"); | ||
}, | ||
}; |
29 changes: 14 additions & 15 deletions
29
...ase/migrations/2024.01.19T10.00.00.change_data_tool_resource_type_relation_to_has_many.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
module.exports = { | ||
async up(knex) { | ||
// change the relation from 1:1 to 1:n without losing data | ||
|
||
// add a data_tool_resource_type_order column | ||
await knex.schema.table('data_tools_data_tool_resource_type_links', table => { | ||
table.integer('data_tool_resource_type_order'); | ||
}); | ||
// populate the reorder column with 1 | ||
await knex.raw('UPDATE data_tools_data_tool_resource_type_links SET data_tool_resource_type_order = 1'); | ||
// make the column not nullable | ||
await knex.schema.alterTable('data_tools_data_tool_resource_type_links', table => { | ||
table.integer('data_tool_resource_type_order').notNullable().alter(); | ||
}); | ||
// rename the table to match strapi convention | ||
await knex.schema.renameTable('data_tools_data_tool_resource_type_links', 'data_tools_data_tool_resource_types_links'); | ||
// change the relation from 1:1 to 1:n without losing data | ||
// add a data_tool_resource_type_order column | ||
// await knex.schema.table('data_tools_data_tool_resource_type_links', table => { | ||
// table.integer('data_tool_resource_type_order'); | ||
// }); | ||
// // populate the reorder column with 1 | ||
// await knex.raw('UPDATE data_tools_data_tool_resource_type_links SET data_tool_resource_type_order = 1'); | ||
// // make the column not nullable | ||
// await knex.schema.alterTable('data_tools_data_tool_resource_type_links', table => { | ||
// table.integer('data_tool_resource_type_order').notNullable().alter(); | ||
// }); | ||
// // rename the table to match strapi convention | ||
// await knex.schema.renameTable('data_tools_data_tool_resource_type_links', 'data_tools_data_tool_resource_types_links'); | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters