From 784b7784cdad78f31104fc2c2e31c9d9f9fbdcf3 Mon Sep 17 00:00:00 2001 From: Carlos Quiroz Date: Sat, 28 Dec 2024 11:28:43 -0300 Subject: [PATCH] Squash migrations --- explore/src/main/scala/explore/tabs/ObsTabTiles.scala | 2 +- .../down.sql | 1 - .../up.sql | 1 - .../down.sql | 5 +++++ .../up.sql | 5 +++++ .../down.sql | 1 - .../up.sql | 1 - 7 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/down.sql delete mode 100644 hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/up.sql rename hasura/user-prefs/migrations/default/{1730765051390_new_table_ids => 1735245383258_calibration_layouts}/down.sql (57%) rename hasura/user-prefs/migrations/default/{1730765051390_new_table_ids => 1735245383258_calibration_layouts}/up.sql (57%) delete mode 100644 hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/down.sql delete mode 100644 hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/up.sql diff --git a/explore/src/main/scala/explore/tabs/ObsTabTiles.scala b/explore/src/main/scala/explore/tabs/ObsTabTiles.scala index 87e18aa49a..8ed18f8a89 100644 --- a/explore/src/main/scala/explore/tabs/ObsTabTiles.scala +++ b/explore/src/main/scala/explore/tabs/ObsTabTiles.scala @@ -52,6 +52,7 @@ import explore.undo.UndoSetter import japgolly.scalajs.react.* import japgolly.scalajs.react.extra.router.SetRouteVia import japgolly.scalajs.react.vdom.html_<^.* +import lucuma.core.enums.CalibrationRole import lucuma.core.enums.Site import lucuma.core.math.Angle import lucuma.core.math.Offset @@ -87,7 +88,6 @@ import queries.schemas.odb.ObsQueries import java.time.Instant import scala.collection.immutable.SortedMap import scala.collection.immutable.SortedSet -import lucuma.core.enums.CalibrationRole case class ObsTabTiles( vault: Option[UserVault], diff --git a/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/down.sql b/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/down.sql deleted file mode 100644 index 92a3c23ca3..0000000000 --- a/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/down.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM "public"."lucumaGridLayoutId" WHERE "id" = 'observations_specphoto'; diff --git a/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/up.sql b/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/up.sql deleted file mode 100644 index 90a6be92aa..0000000000 --- a/hasura/user-prefs/migrations/default/1735245368319_insert_into_public_lucumaGridLayoutId/up.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO "public"."lucumaGridLayoutId"("id") VALUES (E'observations_specphoto'); diff --git a/hasura/user-prefs/migrations/default/1730765051390_new_table_ids/down.sql b/hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/down.sql similarity index 57% rename from hasura/user-prefs/migrations/default/1730765051390_new_table_ids/down.sql rename to hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/down.sql index 54f7db2c0e..74d84b8ea1 100644 --- a/hasura/user-prefs/migrations/default/1730765051390_new_table_ids/down.sql +++ b/hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/down.sql @@ -1,3 +1,8 @@ + +DELETE FROM "public"."lucumaGridLayoutId" WHERE "id" = 'observations_twilight'; + +DELETE FROM "public"."lucumaGridLayoutId" WHERE "id" = 'observations_specphoto'; + DELETE FROM "public"."lucumaTableIds" WHERE "id" = 'observation_validations'; DELETE FROM "public"."lucumaTableIds" WHERE "id" = 'requested_configs'; DELETE FROM "public"."lucumaTableIds" WHERE "id" = 'unrequested_configs'; diff --git a/hasura/user-prefs/migrations/default/1730765051390_new_table_ids/up.sql b/hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/up.sql similarity index 57% rename from hasura/user-prefs/migrations/default/1730765051390_new_table_ids/up.sql rename to hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/up.sql index 0f87620836..2f17ebc230 100644 --- a/hasura/user-prefs/migrations/default/1730765051390_new_table_ids/up.sql +++ b/hasura/user-prefs/migrations/default/1735245383258_calibration_layouts/up.sql @@ -1,3 +1,8 @@ + INSERT INTO "public"."lucumaTableIds"("id") VALUES (E'observation_validations'); INSERT INTO "public"."lucumaTableIds"("id") VALUES (E'requested_configs'); INSERT INTO "public"."lucumaTableIds"("id") VALUES (E'unrequested_configs'); + +INSERT INTO "public"."lucumaGridLayoutId"("id") VALUES (E'observations_specphoto'); + +INSERT INTO "public"."lucumaGridLayoutId"("id") VALUES (E'observations_twilight'); diff --git a/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/down.sql b/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/down.sql deleted file mode 100644 index 08456f5e10..0000000000 --- a/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/down.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM "public"."lucumaGridLayoutId" WHERE "id" = 'observations_twilight'; diff --git a/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/up.sql b/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/up.sql deleted file mode 100644 index f7323db953..0000000000 --- a/hasura/user-prefs/migrations/default/1735245383258_insert_into_public_lucumaGridLayoutId/up.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO "public"."lucumaGridLayoutId"("id") VALUES (E'observations_twilight');