소스 검색

refactor(database): drop 3 columns in a single transaction

jvoisin 1 년 전
부모
커밋
8641f5f2a3
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      internal/database/migrations.go

+ 4 - 3
internal/database/migrations.go

@@ -1125,9 +1125,10 @@ var migrations = []func(tx *sql.Tx, driver string) error{
 	},
 	func(tx *sql.Tx, _ string) (err error) {
 		sql := `
-			ALTER TABLE integrations DROP COLUMN pocket_enabled;
-			ALTER TABLE integrations DROP COLUMN pocket_access_token;
-			ALTER TABLE integrations DROP COLUMN pocket_consumer_key;
+			ALTER TABLE integrations
+				DROP COLUMN pocket_enabled,
+				DROP COLUMN pocket_access_token,
+				DROP COLUMN pocket_consumer_key;
 		`
 		_, err = tx.Exec(sql)
 		return err