Skip to content

Commit ca8c6ff

Browse files
committed
Remove migration
1 parent ee83f58 commit ca8c6ff

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

app/src/main/scala/org/alephium/explorer/persistence/Migrations.scala

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,9 @@ import org.alephium.explorer.persistence.schema.CustomGetResult._
3131
@SuppressWarnings(Array("org.wartremover.warts.AnyVal"))
3232
object Migrations extends StrictLogging {
3333

34-
val latestVersion: MigrationVersion = MigrationVersion(1)
34+
val latestVersion: MigrationVersion = MigrationVersion(0)
3535

36-
def migration1(implicit ec: ExecutionContext): DBActionAll[Unit] =
37-
for {
38-
_ <-
39-
sqlu"""ALTER TABLE contracts ADD COLUMN IF NOT EXISTS main_chain boolean NOT NULL DEFAULT TRUE"""
40-
_ <-
41-
sqlu"""ALTER TABLE events ADD COLUMN IF NOT EXISTS main_chain boolean NOT NULL DEFAULT TRUE"""
42-
_ <- sqlu"""
43-
UPDATE contracts
44-
SET main_chain = false
45-
WHERE block_hash IN (SELECT hash FROM block_headers WHERE main_chain = false)
46-
"""
47-
_ <- sqlu"""
48-
UPDATE events
49-
SET main_chain = false
50-
WHERE block_hash IN (SELECT hash FROM block_headers WHERE main_chain = false)
51-
"""
52-
} yield ()
53-
54-
private def migrations(implicit ec: ExecutionContext): Seq[DBActionAll[Unit]] = Seq(
55-
migration1
56-
)
36+
private val migrations: Seq[DBActionAll[Unit]] = Seq()
5737

5838
def migrationsQuery(
5939
versionOpt: Option[MigrationVersion]

0 commit comments

Comments
 (0)