From 32c1c6ab7539041de575e46ff929e0d48be36023 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Mon, 28 Sep 2020 02:14:34 -0700 Subject: [PATCH] Remove redundant modifiers --- DB/Sources/DB/Content/ContentDatabase.swift | 8 ++++---- DB/Sources/DB/Identity/IdentityDatabase.swift | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DB/Sources/DB/Content/ContentDatabase.swift b/DB/Sources/DB/Content/ContentDatabase.swift index b4a0e44..7ccaa90 100644 --- a/DB/Sources/DB/Content/ContentDatabase.swift +++ b/DB/Sources/DB/Content/ContentDatabase.swift @@ -283,7 +283,7 @@ private extension ContentDatabase { migrator.registerMigration("0.1.0") { db in try db.create(table: "accountRecord") { t in - t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("username", .text).notNull() t.column("acct", .text).notNull() t.column("displayName", .text).notNull() @@ -306,7 +306,7 @@ private extension ContentDatabase { } try db.create(table: "statusRecord") { t in - t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("uri", .text).notNull() t.column("createdAt", .datetime).notNull() t.column("accountId", .text).notNull().references("accountRecord", column: "id") @@ -338,7 +338,7 @@ private extension ContentDatabase { } try db.create(table: "timeline") { t in - t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("listTitle", .text).indexed().collate(.localizedCaseInsensitiveCompare) } @@ -352,7 +352,7 @@ private extension ContentDatabase { } try db.create(table: "filter") { t in - t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("phrase", .text).notNull() t.column("context", .blob).notNull() t.column("expiresAt", .date).indexed() diff --git a/DB/Sources/DB/Identity/IdentityDatabase.swift b/DB/Sources/DB/Identity/IdentityDatabase.swift index 7a3ff99..76e4c24 100644 --- a/DB/Sources/DB/Identity/IdentityDatabase.swift +++ b/DB/Sources/DB/Identity/IdentityDatabase.swift @@ -231,14 +231,14 @@ private extension IdentityDatabase { migrator.registerMigration("0.1.0") { db in try db.create(table: "instance", ifNotExists: true) { t in - t.column("uri", .text).notNull().primaryKey(onConflict: .replace) + t.column("uri", .text).primaryKey(onConflict: .replace) t.column("streamingAPI", .text) t.column("title", .text) t.column("thumbnail", .text) } try db.create(table: "identityRecord", ifNotExists: true) { t in - t.column("id", .text).indexed().notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("url", .text).notNull() t.column("authenticated", .boolean).notNull() t.column("pending", .boolean).notNull() @@ -251,7 +251,7 @@ private extension IdentityDatabase { } try db.create(table: "account", ifNotExists: true) { t in - t.column("id", .text).notNull().primaryKey(onConflict: .replace) + t.column("id", .text).primaryKey(onConflict: .replace) t.column("identityID", .text).notNull() .references("identityRecord", column: "id", onDelete: .cascade) t.column("username", .text).notNull()