Skip to content

Comments

DataStore Foreign Keys#181

Merged
JVickery-TBS merged 16 commits intocanada-py3from
feature/ds-foreign-keys
Sep 26, 2024
Merged

DataStore Foreign Keys#181
JVickery-TBS merged 16 commits intocanada-py3from
feature/ds-foreign-keys

Conversation

@JVickery-TBS
Copy link

Help me.

- Started working on fereign key constraints for the datastore.
- Continued working on fereign key constraints for the datastore.
@JVickery-TBS
Copy link
Author

Okay we got foreign keys working on datastore_create, with the create_table and alter_table back-end methods (might be a better way to do the alter_table one, for checking current constraints but not sure. I tried a couple things and think I landed on a good one).

I ended up doing a hash for the foreign key constraint name based on foreign table, primary columns, and foreign columns. I think that should work out as the hashes should get generated the same based on the names.

Figured that the constraint name did not matter if we can get the constraints outputted in the datastore_info action for a field. So fields will, in theory, have a foreignkeys attribute returned, either as None or as a parsed out version of the foreign table and foreign columns.

Once I have the datastore_info down, I will figure out the datastore_delete. Noting that datastore_records_delete is just a wrapper of datastore_delete so all should be fine with that action. Will probably just need to catch ValidationError and spit it out in a Flask response way.

- Outputted foreign keys to datastore_info.
- Handled constraint errors in delete.
- Changed delete table from CASCADE to RESTRICT.
- More foreign key stuffs.
- Added GET request to DS Info.
- Add drop to existing foreign keys of none or new ones are provided.
- Removed incomplete info from datastore_info for foreign key outputs.
- Explicitly set on update to restrict for foreign key constraints.
- Attempting fix for our JS/jQuery versions.
- Minor fixes for our setup of jquery versions.
- Added more change log files.
@JVickery-TBS JVickery-TBS merged commit c2b1c08 into canada-py3 Sep 26, 2024
@JVickery-TBS JVickery-TBS deleted the feature/ds-foreign-keys branch September 26, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants