Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Annihilate all unsued migrations and queries in the dal (ENG-2435)#3494

Merged
si-bors-ng[bot] merged 1 commit intomainfrom
nick/f18680e
Apr 2, 2024
Merged

Annihilate all unsued migrations and queries in the dal (ENG-2435)#3494
si-bors-ng[bot] merged 1 commit intomainfrom
nick/f18680e

Conversation

@nickgerace
Copy link
Copy Markdown
Contributor

@nickgerace nickgerace commented Apr 2, 2024

Description

This is it. Since merging the new engine onto main (#3113), we have kept around migrations and queries to help restore functionality in the system. We're now at a point where we can destroy the bulk of our old migrations and queries. You all served us well.

Additional or Noteworthy Changes

  • Move and rename all remaining queries to subdirectories based on which tables they reference
  • Remove dead code related to migrations and queries
  • Modify func-related and validation-related migrations to work since they are still used a hybrid fashion
  • Make FuncBinding methods private that can be made private
  • Fix "todo" for missing builtin workspace
  • Fix "get_diff" integration test final assertion

@github-actions github-actions Bot added the A-dal label Apr 2, 2024
@nickgerace nickgerace changed the title Annihilate all unsued migrations and queries in the dal Annihilate all unsued migrations and queries in the dal (ENG-2435) Apr 2, 2024
@nickgerace nickgerace marked this pull request as ready for review April 2, 2024 19:42
This is it. Since merging the new engine onto main, we have kept around
migrations and queries to help restore functionality in the system.
We're now at a point where we can destroy the bulk of our old migrations
and queries. You all served us well.

Additional or noteworthy changes:

- Move and rename all remaining queries to subdirectories based on which
  tables they reference
- Remove dead code related to migrations and queries
- Modify func-related and validation-related migrations to work since
  they are still used a hybrid fashion
- Make FuncBinding methods private that can be made private
- Fix "todo" for missing builtin workspace
- Fix "get_diff" integration test final assertion

Signed-off-by: Nick Gerace <nick@systeminit.com>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Func and leave FuncBinding and FuncBindingReturnValue

Comment on lines -1 to -4
DROP TABLE validation_prototypes CASCADE;
DELETE FROM standard_models where table_name = 'validation_prototypes';
DROP TABLE validation_resolvers CASCADE;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to drop the old tables if they are never migrated

ADD COLUMN code_blake3 TEXT,
DROP COLUMN code_sha256;

DROP TABLE func_binding_belongs_to_func CASCADE;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the primary change of this file

// We expect there to be a diff as we have changed the componentType on this changeset but HEAD is a component
assert_eq!(
Some("{\n \"si\": {\n \"color\": \"#ffffff\",\n \"name\": \"this is a new component\",\n \"type\": \"component\"\n },\n \"domain\": {\n \"name\": \"this is a new component\",\n \"possible_world_a\": {\n \"wormhole_1\": {\n \"wormhole_2\": {\n \"wormhole_3\": {}\n }\n }\n },\n \"possible_world_b\": {\n \"wormhole_1\": {\n \"wormhole_2\": {\n \"wormhole_3\": {\n \"naming_and_necessity\": \"not hesperus\"\n }\n }\n }\n },\n \"universe\": {\n \"galaxies\": []\n }\n }\n}".to_string()), // expected
Some(" {\n \"si\": {\n \"color\": \"#ffffff\",\n \"name\": \"this is a new component\",\n- \"type\": \"component\"\n+ \"type\": \"configurationFrameDown\"\n },\n \"domain\": {\n \"name\": \"this is a new component\",\n \"possible_world_a\": {\n \"wormhole_1\": {\n \"wormhole_2\": {\n \"wormhole_3\": {}\n }\n }\n },\n \"possible_world_b\": {\n \"wormhole_1\": {\n \"wormhole_2\": {\n \"wormhole_3\": {\n \"naming_and_necessity\": \"not hesperus\"\n }\n }\n }\n },\n \"universe\": {\n \"galaxies\": []\n }\n }\n }".to_string()), // expected
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit strange that this was passing before. The new assertion is the right shape.

@nickgerace
Copy link
Copy Markdown
Contributor Author

bors merge

@si-bors-ng
Copy link
Copy Markdown
Contributor

si-bors-ng Bot commented Apr 2, 2024

Build succeeded:

@si-bors-ng si-bors-ng Bot merged commit bbd1995 into main Apr 2, 2024
@si-bors-ng si-bors-ng Bot deleted the nick/f18680e branch April 2, 2024 21:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant