cloudspannerecosystem / yo

yo is a command-line tool to generate Go code for Google Cloud Spanner.
MIT License
312 stars 52 forks source link

[v1] Ignore alter table statement to add foreign key in schema file #69

Closed tyamagu2 closed 3 years ago

tyamagu2 commented 3 years ago

Ignore alter table statement to add a foreign key 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.

ref: #67