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

[v2] Ignore alter table statement to add foreign key in schema file #67

Merged

Conversation

tyamagu2
Copy link
Contributor

Ignore alter table add foreign key statement when parsing schema file.

Spanner schema may contain alter table statements to add foreign keys.
For example, GetDatabaseDdl of spanner admin API seems to return such statement
when table A has a foreign key that references table B and B's name comes later in alphabetical order than A.
Such statements should not prevent yo from generating go code.

Schema may contain alter table statement to add foreign key.
@tyamagu2 tyamagu2 changed the title Ignore alter table add foreign key statement [v2] Ignore alter table add foreign key statement Jul 15, 2021
@tyamagu2 tyamagu2 changed the title [v2] Ignore alter table add foreign key statement [v2] Ignore alter table statement to add foreign key in schema file Jul 15, 2021
@kazegusuri
Copy link
Collaborator

For example, GetDatabaseDdl of spanner admin API seems to return such statement
when table A has a foreign key that references table B and B's name comes later in alphabetical order than A.

I didn't know that!

@kazegusuri kazegusuri merged commit e36f8d5 into cloudspannerecosystem:v2-update Jul 22, 2021
@tyamagu2 tyamagu2 deleted the ignore-alter-table-add-fk branch July 22, 2021 06:58
@kazegusuri kazegusuri added the v2 label Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants