yesodweb/yesod — Issue #182: Persistent sql=different_table doesn't like foreign keys on migrate
Author: ondrap
Created: 2011-12-13 22:10:13+00:00
State: open

The different naming of tables doesn't get propagated to the foreign keys.. e.g.:

Group sql=groups
name Text
UniqueGroupName name
Probe sql=probes
name Text
defaultGroup GroupId
...
....
```

Migrating: CREATE TABLE "groups"(id SERIAL PRIMARY KEY UNIQUE,"name" VARCHAR NOT NULL)
Migrating: CREATE TABLE "probes"(id SERIAL PRIMARY KEY UNIQUE,"name" VARCHAR NOT NULL,"type" VARCHAR NOT NULL,"defaultGroup" INT8 NOT NULL REFERENCES "Group","config" VARCHAR NOT NULL,"conditions" VARCHAR NOT NULL)
SqlError {seState = "42P01", seNativeError = 7, seErrorMsg = "execute: PGRES_FATAL_ERROR: ERROR: relation \"Group\" does not exist\n"}