Merge ~cjwatson/rutabaga:fix-migrate-db into rutabaga:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 2774fefe547b7843fff0f14a1a7b2da58d4da579
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/rutabaga:fix-migrate-db
Merge into: rutabaga:master
Diff against target: 18 lines (+2/-2)
1 file modified
db/rutabaga.schema (+2/-2)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+441591@code.launchpad.net

Commit message

db: Don't fail migration if Token table already exists

Description of the change

The database migration handling in this project is very crude and needs to be entirely rewritten, but this should fix a problem that's blocking deployments for the moment.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/db/rutabaga.schema b/db/rutabaga.schema
2index d7cdd77..7cd04ff 100644
3--- a/db/rutabaga.schema
4+++ b/db/rutabaga.schema
5@@ -1,5 +1,5 @@
6 BEGIN TRANSACTION;
7-CREATE TABLE Token
8+CREATE TABLE IF NOT EXISTS Token
9 (
10 id INTEGER PRIMARY KEY AUTOINCREMENT,
11 secret VARCHAR(255),
12@@ -7,4 +7,4 @@ username VARCHAR(255) UNIQUE,
13 timestamp TEXT,
14 valid INTEGER DEFAULT 1
15 );
16-COMMIT;
17\ No newline at end of file
18+COMMIT;

Subscribers

People subscribed via source and target branches