Skip to content

Additional table create change#17

Open
blagojabozinovski wants to merge 2 commits into
ckan-demofrom
demo-test
Open

Additional table create change#17
blagojabozinovski wants to merge 2 commits into
ckan-demofrom
demo-test

Conversation

@blagojabozinovski
Copy link
Copy Markdown

  • Change the way the additional validation table is created
  • Change the function that checks if the validation table exists

finished = Column(DateTime)
report = Column(JSON)
error = Column(JSON)
mapper(Validation, validation_table)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is going away in SQLAlchemy 2.0.


def tables_exist():
return Validation.__table__.exists()
eng = sa.create_engine(config.get('sqlalchemy.url'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very inelegant approach. The create_tables function is idempotent so this function is not really needed anyway.

@ThrawnCA
Copy link
Copy Markdown

For reference: https://github.com/qld-gov-au/ckanext-validation/blob/master/ckanext/validation/model.py is compatible with latest CKAN master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants