Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Generated schema is incorrect #6

Open
bgreenlee opened this issue Feb 19, 2010 · 1 comment
Open

Generated schema is incorrect #6

bgreenlee opened this issue Feb 19, 2010 · 1 comment

Comments

@bgreenlee
Copy link
Member

Following the instructions in GETTING-STARTED, I ran:
java -jar target/grendel-${VERSION}.jar schema -c grendel.properties > setup-grendel.sql
but the generated SQL starts with:
alter table documents drop foreign key FK_DOCUMENT_TO_OWNER;
alter table links drop foreign key FK_LINK_TO_USER;
alter table links drop foreign key FK_LINK_TO_DOCUMENT;
and since those tables don't exist yet, mysql barfs when you try to run the script.

I've been poking around the source to try to figure out how to fix this, and I'm not seeing how it's being generated. Is Shore doing it?

@precipice
Copy link
Member

It looks to me like the sense of the --migration flag is inverted. Add that flag and it looks like you get a full schema script.

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

No branches or pull requests

2 participants