Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction PDO table not upgradable #7

Closed
judgej opened this issue Aug 15, 2013 · 1 comment
Closed

Transaction PDO table not upgradable #7

judgej opened this issue Aug 15, 2013 · 1 comment

Comments

@judgej
Copy link
Member

judgej commented Aug 15, 2013

The PDO transaction model has createTable() to create the database table for storage of the registered transactions. The table is create from the Transaction metadata (all fields with a "store" flag set true).

When the metadata is extended in library releases, there is no updateTable() method that can be used to bring the table into line with the current metadata. It could with one.

judgej added a commit that referenced this issue Aug 29, 2013
@judgej
Copy link
Member Author

judgej commented Aug 29, 2013

The TransactionPdo model now includes an updateTable() method to do dirty blind ALTER TABLE statements. Call that to get the table into shape during any upgrades. It will set pdo_error_messages for any PDO errors found, but all should be "column already exists" type errors and so all can be ignored.

We may revisit this at a later date, if we want to do proper migrations that help it plug into other applications.

@judgej judgej closed this as completed Aug 29, 2013
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

No branches or pull requests

1 participant