Migrations: Adding mandatory relation?
Ramsey Gurley <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hi All, How do you add a mandatory relationship with a migration? If I were to do this manually, I'd create an optional FK, populate the FK column with the correct data, alter the table to make the FK mandatory, and add an FK constraint. I can't do that with migrations, because the populate step has to happen at the end with a post migration. I see with ERXMigration, I can do this with custom sql, but then that sucks too. I have to have essentially a Model_DB.sql file for every single database, which I really don't care to do. I could waste my weekend doing this for the databases I use, but then I eliminate the framework as an option for people who use DBs that I don't, like MySQL. Or I could take five minutes, regen the Migration0 and tell the whoever is using the framework to fork if they really can't lose their data. None of these options are very appealing, but I'm leaning to the last one. Am I missing some secret Migration foo that would help me here? Ramsey ------------------------------------------------------------------------------ The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials, tech docs, whitepapers, evaluation guides, and opinion stories. Check out the most recent posts - join the conversation now. http://goparallel.sourceforge.net/