Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FK constraints #6

Open
oojacoboo opened this issue Mar 2, 2022 · 3 comments
Open

FK constraints #6

oojacoboo opened this issue Mar 2, 2022 · 3 comments

Comments

@oojacoboo
Copy link
Contributor

Am I correct that this script doesn't currently work if a table has any objects depending on it, ala FK constraints? There is an option to cascade a DROP statement in this situation, but obviously, those FK constraints would need to be recreated.

@oojacoboo
Copy link
Contributor Author

oojacoboo commented Mar 2, 2022

So, after further examination, it seems the issue is related to quoted identifiers. When using a quoted identifier for a table, it doesn't find the relations.

@GammaGames
Copy link
Contributor

Hmm, do you have a simple example database I could use to test it on? I could see the quoted identifiers causing issues

@oojacoboo
Copy link
Contributor Author

Unfortunately I don't have an example database, but this happened on a user table. That's a reserved word, so it must be quoted. I was able to pass a quoted string through the table argument. But it doesn't seem to work when getting the FK relations. Luckily we don't have many reserved keyword tables, so it's not a huge issue, but it would be nice if it supported this.

I also tried to do a refactor, but ran into some issues with it and gave up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants