ckan / ckanext-issues

CKAN Issues Extension
https://github.com/ckan/ideas-and-roadmap/issues/4
MIT License
14 stars 31 forks source link

don't try to initialize model before ckan tables are created #54

Closed deniszgonjanin closed 8 years ago

deniszgonjanin commented 8 years ago

This is an edge case that happens when initializing the plugin at the same time CKAN is initialized. In this case configure() will try to create the issues tables before the CKAN ones exist, causing failing foreign keys.

deniszgonjanin commented 8 years ago

nevermind, needs more thought

davidread commented 8 years ago

Denis, join us on our maintained fork: https://github.com/datagovuk/ckanext-issues where we have moved the creation of the db tables into a paster command, so it can be run manually once the ckan tables are setup (as per agreement here: https://github.com/ckan/ideas-and-roadmap/issues/164 ). In addition in our fork we've got rid of the naughty foreign keys to packages which are probably also to do with this problem.

davidread commented 8 years ago

This sort of problem is the reason we need to do this: https://github.com/okfn/ckanext-issues/issues/55 so please comment on that.

deniszgonjanin commented 8 years ago

Thanks for the heads up @davidread!