From 3e3ae4165e016587659beaf3f0fe4f5b5ec08ff9 Mon Sep 17 00:00:00 2001 From: Thomas Droxler Date: Tue, 2 Jul 2024 13:38:19 +0200 Subject: [PATCH] Remove migration --- .../explorer/persistence/Migrations.scala | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/app/src/main/scala/org/alephium/explorer/persistence/Migrations.scala b/app/src/main/scala/org/alephium/explorer/persistence/Migrations.scala index 468a0119..23ec0d7b 100644 --- a/app/src/main/scala/org/alephium/explorer/persistence/Migrations.scala +++ b/app/src/main/scala/org/alephium/explorer/persistence/Migrations.scala @@ -31,29 +31,9 @@ import org.alephium.explorer.persistence.schema.CustomGetResult._ @SuppressWarnings(Array("org.wartremover.warts.AnyVal")) object Migrations extends StrictLogging { - val latestVersion: MigrationVersion = MigrationVersion(1) + val latestVersion: MigrationVersion = MigrationVersion(0) - def migration1(implicit ec: ExecutionContext): DBActionAll[Unit] = - for { - _ <- - sqlu"""ALTER TABLE contracts ADD COLUMN IF NOT EXISTS main_chain boolean NOT NULL DEFAULT TRUE""" - _ <- - sqlu"""ALTER TABLE events ADD COLUMN IF NOT EXISTS main_chain boolean NOT NULL DEFAULT TRUE""" - _ <- sqlu""" - UPDATE contracts - SET main_chain = false - WHERE block_hash IN (SELECT hash FROM block_headers WHERE main_chain = false) - """ - _ <- sqlu""" - UPDATE events - SET main_chain = false - WHERE block_hash IN (SELECT hash FROM block_headers WHERE main_chain = false) - """ - } yield () - - private def migrations(implicit ec: ExecutionContext): Seq[DBActionAll[Unit]] = Seq( - migration1 - ) + private def migrations: Seq[DBActionAll[Unit]] = Seq() def migrationsQuery( versionOpt: Option[MigrationVersion]