Skip to content

Need to automate database schema updates #1297

@RJPercival

Description

@RJPercival

When we have changed the database schema in the past, we have expected users to either delete and recreate their database (e.g. with scripts/resetdb.sh), or apply schema changes manually (after reverse-engineering them from commits). Users have complained that this (amongst other things) makes it painful to update Trillian. Instead, we should provide database schema migration scripts, e.g. a directory of SQL files containing files such as "increase_display_name_length.sql":

ALTER TABLE Trees ALTER COLUMN DisplayName VARCHAR (100)

We would no longer change the schema itself, but instead add SQL migration scripts to apply the changes we'd like. This does, admittedly, make seeing what the final schema looks like a bit harder - I'm open to suggestions on how to improve this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions