Set version number and make it migration name

This commit is contained in:
Justin Mazzocchi 2020-09-04 22:52:16 -07:00
parent 70720b3c26
commit 4e029b40ac
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
3 changed files with 10 additions and 8 deletions

View File

@ -192,8 +192,8 @@ private extension ContentDatabase {
static func migrate(_ writer: DatabaseWriter) throws {
var migrator = DatabaseMigrator()
migrator.registerMigration("createStatuses") { db in
try db.create(table: "accountRecord", ifNotExists: true) { t in
migrator.registerMigration("0.1.0") { db in
try db.create(table: "accountRecord") { t in
t.column("id", .text).notNull().primaryKey(onConflict: .replace)
t.column("username", .text).notNull()
t.column("acct", .text).notNull()
@ -216,7 +216,7 @@ private extension ContentDatabase {
t.column("movedId", .text).indexed().references("accountRecord", column: "id")
}
try db.create(table: "statusRecord", ifNotExists: true) { t in
try db.create(table: "statusRecord") { t in
t.column("id", .text).notNull().primaryKey(onConflict: .replace)
t.column("uri", .text).notNull()
t.column("createdAt", .datetime).notNull()
@ -248,12 +248,12 @@ private extension ContentDatabase {
t.column("pinned", .boolean)
}
try db.create(table: "timeline", ifNotExists: true) { t in
try db.create(table: "timeline") { t in
t.column("id", .text).notNull().primaryKey(onConflict: .replace)
t.column("listTitle", .text)
}
try db.create(table: "timelineStatusJoin", ifNotExists: true) { t in
try db.create(table: "timelineStatusJoin") { t in
t.column("timelineId", .text)
.indexed()
.notNull()
@ -266,7 +266,7 @@ private extension ContentDatabase {
t.primaryKey(["timelineId", "statusId"], onConflict: .replace)
}
try db.create(table: "statusContextJoin", ifNotExists: true) { t in
try db.create(table: "statusContextJoin") { t in
t.column("parentId", .text)
.indexed()
.notNull()
@ -281,7 +281,7 @@ private extension ContentDatabase {
t.primaryKey(["parentId", "statusId"], onConflict: .replace)
}
try db.create(table: "filter", ifNotExists: true) { t in
try db.create(table: "filter") { t in
t.column("id", .text).notNull().primaryKey(onConflict: .replace)
t.column("phrase", .text).notNull()
t.column("context", .blob).notNull()

View File

@ -666,6 +666,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.metabolist.metatext;
PRODUCT_NAME = Metatext;
SDKROOT = iphoneos;
@ -692,6 +693,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.metabolist.metatext;
PRODUCT_NAME = Metatext;
SDKROOT = iphoneos;

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>