okfn / ckanext-collaborators

User-level permissions for CKAN datasets for CKAN < 2.9
GNU Affero General Public License v3.0
5 stars 2 forks source link

DB init fails if DB tables already exist #7

Closed shevron closed 5 years ago

shevron commented 5 years ago

When running:

paster --plugin=ckanext-collaborators collaborators init-db

It will fail if the DB tables already exist. This makes it a bit difficult to use in some deployment scenarios.

It would be great if the script could be idempotent (e.g. continue silently if tables exist) or, we can have a command line option to ignore if tables exist.

As a workaround, we run with || true but this is a poor workaround as it will not crash on other errors.

shevron commented 5 years ago

I believe this was fixed by 80fa5d98 in 0.0.2