-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Update DBs and clients for ingest and storage
- Loading branch information
Showing
73 changed files
with
4,761 additions
and
4,723 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
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
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
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
1 change: 1 addition & 0 deletions
1
internal/db/migrations/20250207193001_rename_package_table.down.sql
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
RENAME TABLE sip TO package; |
1 change: 1 addition & 0 deletions
1
internal/db/migrations/20250207193001_rename_package_table.up.sql
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
RENAME TABLE package TO sip; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- reverse: modify "preservation_task" table | ||
ALTER TABLE `preservation_task` DROP FOREIGN KEY `preservation_task_preservation_action_tasks`, ADD CONSTRAINT `preservation_task_ibfk_1` FOREIGN KEY (`preservation_action_id`) REFERENCES `preservation_action` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE, DROP INDEX `preservation_task_preservation_action_tasks`, MODIFY COLUMN `preservation_action_id` int unsigned NOT NULL, MODIFY COLUMN `note` longtext NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `completed_at` timestamp(6) NULL, MODIFY COLUMN `started_at` timestamp(6) NULL, MODIFY COLUMN `name` varchar(2048) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `task_id` varchar(36) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `id` int unsigned NOT NULL AUTO_INCREMENT, COLLATE utf8mb4_0900_ai_ci; | ||
-- reverse: modify "preservation_action" table | ||
ALTER TABLE `preservation_action` DROP FOREIGN KEY `preservation_action_sip_preservation_actions`, ADD CONSTRAINT `preservation_action_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `sip` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE, DROP INDEX `preservation_action_sip_preservation_actions`, DROP COLUMN `sip_id`, ADD COLUMN `package_id` int unsigned NOT NULL, MODIFY COLUMN `completed_at` timestamp(6) NULL, MODIFY COLUMN `started_at` timestamp(6) NULL, MODIFY COLUMN `workflow_id` varchar(255) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `id` int unsigned NOT NULL AUTO_INCREMENT, COLLATE utf8mb4_0900_ai_ci; | ||
-- reverse: modify "sip" table | ||
ALTER TABLE `sip` DROP INDEX `sip_status_idx`, DROP INDEX `sip_started_at_idx`, DROP INDEX `sip_name_idx`, DROP INDEX `sip_location_id_idx`, DROP INDEX `sip_created_at_idx`, DROP INDEX `sip_aip_id_idx`, DROP INDEX `run_id`, ADD INDEX `package_status_idx` (`status`), ADD INDEX `package_started_at_idx` (`started_at`), ADD INDEX `package_name_idx` (`name` (50)), ADD INDEX `package_location_id_idx` (`location_id`), ADD INDEX `package_created_at_idx` (`created_at`), ADD INDEX `package_aip_id_idx` (`aip_id`), MODIFY COLUMN `completed_at` timestamp(6) NULL, MODIFY COLUMN `started_at` timestamp(6) NULL, MODIFY COLUMN `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), MODIFY COLUMN `location_id` varchar(36) NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `aip_id` varchar(36) NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `run_id` varchar(36) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `workflow_id` varchar(255) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `name` varchar(2048) NOT NULL COLLATE utf8mb4_0900_ai_ci, MODIFY COLUMN `id` int unsigned NOT NULL AUTO_INCREMENT, COLLATE utf8mb4_0900_ai_ci; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- modify "sip" table | ||
ALTER TABLE `sip` COLLATE utf8mb4_bin, MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT, MODIFY COLUMN `name` varchar(2048) NOT NULL, MODIFY COLUMN `workflow_id` varchar(255) NOT NULL, MODIFY COLUMN `run_id` char(36) NOT NULL, MODIFY COLUMN `aip_id` char(36) NULL, MODIFY COLUMN `location_id` char(36) NULL, MODIFY COLUMN `created_at` timestamp NOT NULL, MODIFY COLUMN `started_at` timestamp NULL, MODIFY COLUMN `completed_at` timestamp NULL, DROP INDEX `package_aip_id_idx`, DROP INDEX `package_created_at_idx`, DROP INDEX `package_location_id_idx`, DROP INDEX `package_name_idx`, DROP INDEX `package_started_at_idx`, DROP INDEX `package_status_idx`, ADD UNIQUE INDEX `run_id` (`run_id`), ADD INDEX `sip_aip_id_idx` (`aip_id`), ADD INDEX `sip_created_at_idx` (`created_at`), ADD INDEX `sip_location_id_idx` (`location_id`), ADD INDEX `sip_name_idx` (`name` (50)), ADD INDEX `sip_started_at_idx` (`started_at`), ADD INDEX `sip_status_idx` (`status`); | ||
-- modify "preservation_action" table | ||
ALTER TABLE `preservation_action` COLLATE utf8mb4_bin, MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT, MODIFY COLUMN `workflow_id` varchar(255) NOT NULL, MODIFY COLUMN `started_at` timestamp NULL, MODIFY COLUMN `completed_at` timestamp NULL, DROP COLUMN `package_id`, ADD COLUMN `sip_id` bigint NOT NULL, ADD INDEX `preservation_action_sip_preservation_actions` (`sip_id`), DROP FOREIGN KEY `preservation_action_ibfk_1`, ADD CONSTRAINT `preservation_action_sip_preservation_actions` FOREIGN KEY (`sip_id`) REFERENCES `sip` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE; | ||
-- modify "preservation_task" table | ||
ALTER TABLE `preservation_task` COLLATE utf8mb4_bin, MODIFY COLUMN `id` bigint NOT NULL AUTO_INCREMENT, MODIFY COLUMN `task_id` char(36) NOT NULL, MODIFY COLUMN `name` varchar(2048) NOT NULL, MODIFY COLUMN `started_at` timestamp NULL, MODIFY COLUMN `completed_at` timestamp NULL, MODIFY COLUMN `note` longtext NOT NULL, MODIFY COLUMN `preservation_action_id` bigint NOT NULL, ADD INDEX `preservation_task_preservation_action_tasks` (`preservation_action_id`), DROP FOREIGN KEY `preservation_task_ibfk_1`, ADD CONSTRAINT `preservation_task_preservation_action_tasks` FOREIGN KEY (`preservation_action_id`) REFERENCES `preservation_action` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE; |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
h1:w+PCoLZubbqC3OjanelOkLkm8latla/U8szWEuCeUCw= | ||
1570659451_init.down.sql h1:hZkExHm7J+Njznl8jVlCA3ePmlKfnCi3h0UFLvgU0kU= | ||
1570659451_init.up.sql h1:/Bi8TK4Lt/bWcuxnQMqAvRO3e/NhFDQusiR3fjk5Z3c= | ||
1710442322_nullable_aip_id.down.sql h1:naFYM+Aybp/Vz8EwJOG7fRf/CWmV87qwylR4YR/76XE= | ||
1710442322_nullable_aip_id.up.sql h1:POGPYt8Mt0rWGMfns5JtXF4WAadA+q2Lpk9i69BanKc= | ||
20250207193001_rename_package_table.down.sql h1:LtX8QzPCvUyR7lqfEJRuX394D3I6YuedEBbE/o3VBkc= | ||
20250207193001_rename_package_table.up.sql h1:d4wwV9M/xPJhmTLB2fxMG00PMkKtyfRdXA/8pxPB3J8= | ||
20250207204127_use_atlas.down.sql h1:gZ3Cz1x5FG9HHgNpYEFltj2x4eAnTU/U+evjoS+/tx8= | ||
20250207204127_use_atlas.up.sql h1:qZqCNH5J6wjoAtRHAkrtdsbStkLLmRZV/PHgq5fSxoc= |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.