hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.14k stars 2.77k forks source link

Auto migrations takes a very long time (20 mins) #3654

Closed flybayer closed 4 years ago

flybayer commented 4 years ago

I'm deploying this Dockerfile to Render.com which hosts both the app and the DB.

FROM hasura/graphql-engine:v1.0.0.cli-migrations

COPY ./migrations /hasura-migrations

Problem

Migrations are taking a very long time. For example, the below commit took 20 minutes for the migrations to run.

| 3     0       hasura/migrations/1578006637841_create_table_public_x_cache_shopify_products/down.yaml
| 10    0       hasura/migrations/1578006637841_create_table_public_x_cache_shopify_products/up.yaml
| 3     0       hasura/migrations/1578006855498_create_table_public_x_cache_shopify_productVariants/down.yaml
| 14    0       hasura/migrations/1578006855498_create_table_public_x_cache_shopify_productVariants/up.yaml
| 11    0       hasura/migrations/1578006867682_alter_table_public_x_cache_shopify_products_alter_column_options/down.yaml
| 11    0       hasura/migrations/1578006867682_alter_table_public_x_cache_shopify_products_alter_column_options/up.yaml
| 11    0       hasura/migrations/1578008617640_alter_table_public_x_cache_shopify_products_alter_column_options/down.yaml
| 11    0       hasura/migrations/1578008617640_alter_table_public_x_cache_shopify_products_alter_column_options/up.yaml
| 12    0       hasura/migrations/1578008636900_alter_table_public_x_cache_shopify_productVariants_alter_column_images/down.yaml
| 12    0       hasura/migrations/1578008636900_alter_table_public_x_cache_shopify_productVariants_alter_column_images/up.yaml
| 12    0       hasura/migrations/1578008646868_alter_table_public_x_cache_shopify_productVariants_alter_column_selectedOptions/down.yaml
| 12    0       hasura/migrations/1578008646868_alter_table_public_x_cache_shopify_productVariants_alter_column_selectedOptions/up.yaml
| 6     0       hasura/migrations/1578008668655_add_relationship__table_public_x_cache_shopify_products/down.yaml
| 12    0       hasura/migrations/1578008668655_add_relationship__table_public_x_cache_shopify_products/up.yaml
| 6     0       hasura/migrations/1578008671585_add_relationship__table_public_x_cache_shopify_products/down.yaml
| 8     0       hasura/migrations/1578008671585_add_relationship__table_public_x_cache_shopify_products/up.yaml
| 6     0       hasura/migrations/1578008685246_add_relationship__table_public_x_cache_shopify_productVariants/down.yaml
| 8     0       hasura/migrations/1578008685246_add_relationship__table_public_x_cache_shopify_productVariants/up.yaml
| 6     0       hasura/migrations/1578008690769_add_relationship__table_public_x_cache_shopify_productVariants/down.yaml
| 8     0       hasura/migrations/1578008690769_add_relationship__table_public_x_cache_shopify_productVariants/up.yaml
| 3     0       hasura/migrations/1578012948920_create_table_public_x_queue_shopify_saveToPlatform/down.yaml
| 19    0       hasura/migrations/1578012948920_create_table_public_x_queue_shopify_saveToPlatform/up.yaml
| 3     0       hasura/migrations/1578013393171_create_trigger_queue_shopify_saveToPlatform/down.yaml
| 17    0       hasura/migrations/1578013393171_create_trigger_queue_shopify_saveToPlatform/up.yaml
| 3     0       hasura/migrations/1578025383204_alter_table_public_productOptions_add_column_foreignId/down.yaml
| 3     0       hasura/migrations/1578025383204_alter_table_public_productOptions_add_column_foreignId/up.yaml
| 3     0       hasura/migrations/1578026344078_alter_table_public_products_add_column_foreignId/down.yaml
| 3     0       hasura/migrations/1578026344078_alter_table_public_products_add_column_foreignId/up.yaml
| 6     0       hasura/migrations/1578088896915_alter_table_public_products_alter_column_title/down.yaml
| 6     0       hasura/migrations/1578088896915_alter_table_public_products_alter_column_title/up.yaml
| 6     0       hasura/migrations/1578093621754_alter_table_public_productVariants_alter_column_title/down.yaml
| 6     0       hasura/migrations/1578093621754_alter_table_public_productVariants_alter_column_title/up.yaml
| 3     0       hasura/migrations/1578337857317_create_table_public_x_queue_shopify_transformToPlatform/down.yaml
| 18    0       hasura/migrations/1578337857317_create_table_public_x_queue_shopify_transformToPlatform/up.yaml
| 5     0       hasura/migrations/1578337871049_delete_fk_public_x_queue_shopify_saveToPlatform_x_queue_shopify_saveToPlatform_shopifyAccountId_fkey/down.yaml
| 3     0       hasura/migrations/1578337871049_delete_fk_public_x_queue_shopify_saveToPlatform_x_queue_shopify_saveToPlatform_shopifyAccountId_fkey/up.yaml
| 3     0       hasura/migrations/1578338036983_create_trigger_queue_shopify_transformToPlatform/down.yaml
| 17    0       hasura/migrations/1578338036983_create_trigger_queue_shopify_transformToPlatform/up.yaml
| 8     0       hasura/migrations/1578338480858_alter_table_public_x_queue_shopify_saveToPlatform_drop_column_shopifyAccountId/down.yaml
| 4     0       hasura/migrations/1578338480858_alter_table_public_x_queue_shopify_saveToPlatform_drop_column_shopifyAccountId/up.yaml
| 3     0       hasura/migrations/1578338513787_alter_table_public_x_queue_shopify_saveToPlatform_add_column_products/down.yaml
| 4     0       hasura/migrations/1578338513787_alter_table_public_x_queue_shopify_saveToPlatform_add_column_products/up.yaml
| 8     0       hasura/migrations/1578338518558_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_products/down.yaml
| 8     0       hasura/migrations/1578338518558_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_products/up.yaml
| 3     0       hasura/migrations/1578357302759_alter_table_public_products_add_unique_handle/down.yaml
| 4     0       hasura/migrations/1578357302759_alter_table_public_products_add_unique_handle/up.yaml
| 3     0       hasura/migrations/1578358965635_alter_table_public_shopifyAccounts_add_column_initialSyncState/down.yaml
| 4     0       hasura/migrations/1578358965635_alter_table_public_shopifyAccounts_add_column_initialSyncState/up.yaml
| 3     0       hasura/migrations/1578360092434_alter_table_public_x_queue_shopify_saveToPlatform_add_column_shopifyAccountId/down.yaml
| 4     0       hasura/migrations/1578360092434_alter_table_public_x_queue_shopify_saveToPlatform_add_column_shopifyAccountId/up.yaml
| 8     0       hasura/migrations/1578360097015_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_shopifyAccountId/down.yaml
| 8     0       hasura/migrations/1578360097015_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_shopifyAccountId/up.yaml
| 6     0       hasura/migrations/1578360651386_set_fk_public_productVariants_productId/down.yaml
| 6     0       hasura/migrations/1578360651386_set_fk_public_productVariants_productId/up.yaml
| 6     0       hasura/migrations/1578360669381_set_fk_public_productOptions_productId/down.yaml
| 6     0       hasura/migrations/1578360669381_set_fk_public_productOptions_productId/up.yaml
| 7     0       hasura/migrations/1578360680352_set_fk_public_productOptionValues_productOptionId/down.yaml
| 6     0       hasura/migrations/1578360680352_set_fk_public_productOptionValues_productOptionId/up.yaml
| 7     0       hasura/migrations/1578360844605_set_fk_public_joinVariantValues_productVariantId/down.yaml
| 7     0       hasura/migrations/1578360844605_set_fk_public_joinVariantValues_productVariantId/up.yaml
| 7     0       hasura/migrations/1578360849910_set_fk_public_joinVariantValues_productOptionValueId/down.yaml
| 7     0       hasura/migrations/1578360849910_set_fk_public_joinVariantValues_productOptionValueId/up.yaml
| 8     0       hasura/migrations/1578360868529_set_fk_public_joinProductOptionValueImages_productOptionValueId/down.yaml
| 7     0       hasura/migrations/1578360868529_set_fk_public_joinProductOptionValueImages_productOptionValueId/up.yaml
| 7     0       hasura/migrations/1578360872190_set_fk_public_joinProductOptionValueImages_imageId/down.yaml
| 7     0       hasura/migrations/1578360872190_set_fk_public_joinProductOptionValueImages_imageId/up.yaml

I'm happy to help debug this, but I don't know where to start. Migration logging doesn't give any visibility into what's happening.

lexi-lambda commented 4 years ago

@flybayer I think the issue you describe might be fixed by (or at least helped by) the recently-merged #3394. It would be great if you could try out one of the development builds from that PR—Docker image hasura/graphql-engine:pull3394-17b1de33 would be the one to use—and see if that fixes your problem. If it does, then problem solved, but if it doesn’t, it would be very helpful to know so that we can improve things further.

I do not recommend trying the above image on a database you are not comfortable throwing away. The change has been merged, so it’s likely to be perfectly stable, but it is still unreleased and includes a catalog migration, so downgrading is not as simple as just switching back to a previous version. (It is possible to downgrade, but more of a hassle—we’re in the process of improving the downgrade workflow so it should be much easier starting in the next release, but those improvements aren’t quite done yet.) I would therefore recommend trying that image on a fresh database and running your CLI migrations against that, and reporting back on the performance results.

flybayer commented 4 years ago

@lexi-lambda I'm trying to use the PR image, but it's failing:

Jan 9 02:17:38 PM  ==> Checking out commit 206e06aee51d9e93eba6a22a20cb68b162f299df in branch master
Jan 9 02:17:47 PM  INFO[0001] Downloading base image hasura/graphql-engine:pull3394-17b1de3.cli-migrations
Jan 9 02:17:48 PM  INFO[0002] Downloading base image hasura/graphql-engine:pull3394-17b1de3.cli-migrations
Jan 9 02:17:49 PM  error building image: MANIFEST_UNKNOWN: manifest unknown; map[Tag:pull3394-17b1de3.cli-migrations]
Jan 9 02:17:49 PM  error: exit status 1
FROM hasura/graphql-engine:pull3394-17b1de3.cli-migrations

COPY ./migrations /hasura-migrations
lexi-lambda commented 4 years ago

@flybayer Ah—it looks like we don’t build .cli-migrations images for development builds, for whatever reason. I think we probably ought to change that, but for now I’ve built one manually. Try hasura/graphql-engine:pull3394-b26b7d05.cli-migrations instead.

flybayer commented 4 years ago

@lexi-lambda I made it further, but now it gets stuck waiting for the temp server to start:

Jan 9 03:07:03 PM  ==> Cloning from https://github.com/flybayer/packdigital...
Jan 9 03:07:04 PM  ==> Checking out commit 1967aa4b63e638ae906e5a324eb7e3b24bca6704 in branch master
Jan 9 03:07:06 PM  INFO[0000] Downloading base image hasura/graphql-engine:pull3394-b26b7d05.cli-migrations
Jan 9 03:07:07 PM  INFO[0001] Downloading base image hasura/graphql-engine:pull3394-b26b7d05.cli-migrations
Jan 9 03:07:08 PM  INFO[0001] Downloading base image hasura/graphql-engine:pull3394-b26b7d05.cli-migrations
Jan 9 03:07:08 PM  INFO[0002] Downloading base image hasura/graphql-engine:pull3394-b26b7d05.cli-migrations
Jan 9 03:07:14 PM  INFO[0007] COPY ./migrations /hasura-migrations
Jan 9 03:07:18 PM   ______________________________
Jan 9 03:07:18 PM  < Pushing image to registry... >
Jan 9 03:07:18 PM   ------------------------------
Jan 9 03:07:18 PM          \   ^__^
Jan 9 03:07:18 PM           \  (oo)\_______
Jan 9 03:07:18 PM              (__)\       )\/\
Jan 9 03:07:18 PM                  ||----w |
Jan 9 03:07:18 PM                  ||     ||
Jan 9 03:07:22 PM   ______
Jan 9 03:07:22 PM  < Done >
Jan 9 03:07:22 PM   ------
Jan 9 03:07:22 PM          \   ^__^
Jan 9 03:07:22 PM           \  (oo)\_______
Jan 9 03:07:22 PM              (__)\       )\/\
Jan 9 03:07:22 PM                  ||----w |
Jan 9 03:07:22 PM                  ||     ||
Jan 9 03:07:33 PM  {"timestamp":"2020-01-09T23:07:33.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"database url for migrations is set by HASURA_GRAPHQL_DATABASE_URL"}}
Jan 9 03:07:33 PM  {"timestamp":"2020-01-09T23:07:33.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"migrations server port env var is not set, defaulting to 9691"}}
Jan 9 03:07:33 PM  {"timestamp":"2020-01-09T23:07:33.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"server timeout is not set, defaulting to 30 seconds"}}
Jan 9 03:07:33 PM  {"timestamp":"2020-01-09T23:07:33.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"starting graphql engine temporarily on port 9691"}}
Jan 9 03:07:33 PM  {"timestamp":"2020-01-09T23:07:33.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"waiting 30 for 9691 to be ready"}}
Jan 9 03:07:35 PM  {"type":"startup","timestamp":"2020-01-09T23:07:35.078+0000","level":"info","detail":{"kind":"server_configuration","info":{"live_query_options":{"batch_size":100,"refetch_delay":1},"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","plan_cache_options":{"plan_cache_size":null},"enabled_log_types":["http-log","websocket-log","startup","webhook-log"],"server_host":"HostAny","enable_allowlist":false,"log_level":"info","auth_hook_mode":null,"use_prepared_statements":true,"unauth_role":null,"stringify_numeric_types":false,"enabled_apis":["metadata"],"enable_telemetry":true,"enable_console":true,"auth_hook":null,"jwt_secret":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"console_assets_dir":null,"admin_secret_set":false,"port":9691}}}
Jan 9 03:07:35 PM  {"type":"startup","timestamp":"2020-01-09T23:07:35.078+0000","level":"info","detail":{"kind":"postgres_connection","info":{"retries":1,"database_url":"postgres://test_platform_prod_user:...@dpg-bobqcjd8rbkeup59vbd0/test_platform_prod"}}}
Jan 9 03:08:04 PM  {"timestamp":"2020-01-09T23:08:04.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"failed waiting for 9691"}}
lexi-lambda commented 4 years ago

Question: are you running the image against an empty database, or against a database with something already in it?

flybayer commented 4 years ago

Empty

Edit: I just confirmed that yes, it fails with a brand new DB.

lexi-lambda commented 4 years ago

Curious! For context, this is what I get when I run that same image against my local Postgres database:

{"type":"startup","timestamp":"2020-01-09T23:39:33.460+0000","level":"info","detail":{"kind":"server_configuration","info":{"live_query_options":{"batch_size":100,"refetch_delay":1},"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","plan_cache_options":{"plan_cache_size":null},"enabled_log_types":["http-log","websocket-log","startup","webhook-log"],"server_host":"HostAny","enable_allowlist":false,"log_level":"info","auth_hook_mode":null,"use_prepared_statements":true,"unauth_role":null,"stringify_numeric_types":false,"enabled_apis":["metadata"],"enable_telemetry":true,"enable_console":false,"auth_hook":null,"jwt_secret":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"console_assets_dir":null,"admin_secret_set":false,"port":9691}}}
{"type":"startup","timestamp":"2020-01-09T23:39:33.460+0000","level":"info","detail":{"kind":"postgres_connection","info":{"retries":1,"database_url":"postgres://alexis@host.docker.internal:5432/hasura_dev"}}}
{"type":"startup","timestamp":"2020-01-09T23:39:36.583+0000","level":"info","detail":{"kind":"db_migrate","info":"Successfully initialized the catalog (at version 29)."}}

The last message appears about three seconds after the one before it. But it looks like your instance is getting stuck on the previous step.

Could you maybe tell me what the Postgres version is? I’d like to figure out a way to reproduce the issue locally, but I’m not entirely sure where to start.

flybayer commented 4 years ago

Postgres 11.5

Here's the Render.com YAML file I'm using to deploy this:

services:
- type: web
  name: test-hasura
  env: docker
  dockerfilePath: './hasura/Dockerfile'
  dockerContext: './hasura'
  plan: starter
  branch: master
  healthCheckPath: /v1/version
  envVars:
  - key: HASURA_GRAPHQL_DATABASE_URL
    fromDatabase:
      name: test-db
      property: connectionString
  - key: HASURA_GRAPHQL_ENABLED_APIS
    value: graphql,metadata
  - key: HASURA_GRAPHQL_ENABLE_CONSOLE
    value: true
databases:
- name: test-db
lexi-lambda commented 4 years ago

I spent some time investigating this. I spun up a service on Render using the same configuration you provided, and indeed, I discovered startup was really slow! So I connected to the database directly and ran some queries to see what the database performance was like.

The answer to that question seems to be “terrible.” Here’s a query graphql-engine runs as part of inspecting the database schema:

SELECT * FROM hdb_catalog.hdb_table
LEFT JOIN hdb_catalog.hdb_table_info_agg USING (table_schema, table_name);

I ran this query against three databases:

  1. My local Postgres instance, running on my 2017 MBP.

  2. A Heroku free-tier instance (aka “Hobby Dev”).

  3. A Render free-tier instance (aka “Starter”).

All three databases contain the same data: nothing but the minimal information added by the graphql-engine internal migrations. They contain no user data. I ran the query a few times to give the query plan cache a chance to warm up (which is reasonable, since we run this query many times when executing migrations). Here were my results:

  1. On my local instance, the time stabilized at around 30ms. Obviously it’s totally unfair to compare this time running on my expensive laptop to the free-tier instances, but it sets a good baseline.

  2. On the Heroku instance, the time was consistently about 80–120ms. This is much worse, and the variance is much higher, too, but hey, you get what you pay for.

  3. On the Render instance, this same query took anywhere between 300–1000ms! Most of the time it would be okay, albeit several times worse than the Heroku time, but sometimes it would take an entire second!

For context, this query returns 20 rows. They’re very complicated rows containing a ton of information aggregated into a JSON blob from many subqueries, but it’s still ultimately 20 rows. That time is way slower than I ever anticipated that query being, and the result is unacceptably bad performance.

That’s basically the full description of the issue, but I’ve written up all the gory details as a little thinking aloud as much as anything else. If you really want to know all the subtleties, read on.

A little context

Running migrations is the pathological case for our metadata APIs. We have to make a small change to the database, then reload information about the schema, then do it again. We do this many times, back to back, once for each migration. There are two bottlenecks here:

  1. Actually fetching the data from the database. This involves reloading various pieces of information from Postgres’s pg_catalog tables. We have a really big, scary query that joins all this information together so that graphql-engine can slurp it up.

  2. Processing the data we fetched and updating our in-memory cache. Fetching data from the database is slow, so we maintain an in-memory cache to ensure we only have to refetch it whenever the Postgres schema or Hasura metadata change.

In the past, we’ve tried various ad-hoc solutions to make this process faster. We avoided refetching data from the database as much as possible. In situations where we were making the change to the database anyway, we would munge the in-memory cache directly, saving an extra roundtrip. Of course, this is a little subtle: if the patch we apply to the in-memory cache is not actually the same as the change we’d get if we reloaded everything, disaster strikes!

In the early days of graphql-engine, ensuring these things were consistent wasn’t too hard. But as we’ve added more and more features, the Hasura catalog has gotten more and more complicated, and it’s become a nightmare to handle the combinatorial explosion of different code paths we needed to anticipate in order to keep everything internally-consistent. So #3394 takes a new approach: we don’t munge the in-memory cache directly at all, but instead we apply a kind of schema diffing algorithm to the fetched data, so we only reprocess things that actually changed.

This schema diffing makes point (2) go a lot faster. But remember that we gave up on the cache-munging completely, so now we do (1) even more often than we used to. You’re seeing the effects of that second point. On a fast Postgres instance, that compromise is very cheap, so cheap that it’s almost irrelevant compared to other costs. But on a slow Postgres instance, things are catastrophic.


There’s some good news and some bad news in all this. The bad news is pretty obvious: running migrations on a free Render instance is really, really slow. That bad news is admittedly pretty bad, but there are some silver linings:

Of course, that “good news” probably doesn’t sound very good to you, since you still can’t deploy your application. Not good! Here are my recommendations on how you might work around this issue until we can tighten up the performance here:

  1. The easiest solution is to use a faster Postgres instance, but I realize this is kind of a cop-out, and “throw more money at the problem” isn’t always an option. Still, I figured I’d mention it anyway, since if it is an option, it’s a pretty easy one.

  2. Since migrations are such a pathological case here, it would be possible to run them manually as a one-off job that doesn’t have the 30s startup timeout and just take the one-time hit. After migrating, things should be reasonably zippy again, so you can go back to running things normally.

  3. For the internal graphql-engine migrations, there’s not much you can really do right now but bite the bullet and pay the toll until we improve the bottleneck here. But for your own, user-defined migrations, you can at least cut down on the overhead by using the hasura migrate squash CLI command, which will cut down on the number of distinct migrations that have to be executed.

In theory, we could try to batch all the changes together before reloading information from the database, effectively doing a server-side squash for you automatically. Since we run all the migrations in a single transaction that would be reasonably safe, but it could lead to poor error messages because our integrity checks (things like making sure a column referenced in a permission definition actually exists, for example) wouldn’t get executed until the very end. I think the right solution here probably involves doing something along those lines, but just slightly more clever, so we don’t accidentally screw up the error reporting.

I’ll try and see if there’s any low-hanging fruit to make this faster in the short term, since the current performance on Render is clearly unpalatable. In the meantime, apologies for the bumpiness! We’ll get this smoothed out, and I think in the end we can get it significantly faster than the old approach was, but it might take a little iterating—and learning about cases where the current approach breaks down is super useful, so thank you for the report.

flybayer commented 4 years ago

@lexi-lambda wow.. someone should give you a raise! Thank you so much.

I upgraded the DB on my throwaway test project, but now I get a version error when deploying this PR image:

Jan 10 10:05:59 AM  {"type":"startup","timestamp":"2020-01-10T18:05:58.490+0000","level":"info","detail":{"kind":"server","info":{"time_taken":0.480237947,"message":"starting API server"}}}
Jan 10 10:05:59 AM  {"timestamp":"2020-01-10T18:05:59.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"port 9691 is ready"}}
Jan 10 10:05:59 AM  {"timestamp":"2020-01-10T18:05:59.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"checking for migrations directory"}}
Jan 10 10:05:59 AM  {"timestamp":"2020-01-10T18:05:59.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"env var HASURA_GRAPHQL_MIGRATIONS_DIR is not set, defaulting to /hasura-migrations"}}
Jan 10 10:05:59 AM  {"timestamp":"2020-01-10T18:05:59.000+0000","level":"info","type":"startup","detail":{"kind":"migration-apply","info":"applying migrations from /hasura-migrations"}}
Jan 10 10:06:00 AM  {"level":"info","msg":"Help us improve Hasura! The cli collects anonymized usage stats which\nallow us to keep improving Hasura at warp speed. To opt-out or read more,\nvisit https://docs.hasura.io/1.0/graphql/manual/guides/telemetry.html\n","time":"2020-01-10T18:06:00Z"}
Jan 10 10:06:00 AM  {"error":"cannot update from a non-semver version: pull3394-e47a8c4b","level":"warning","msg":"auto-update failed, run 'hasura update-cli' to update manually","time":"2020-01-10T18:06:00Z"}
Jan 10 10:06:01 AM  time="2020-01-10T18:06:01Z" level=fatal msg="version check: [cli: pull3394-e47a8c4b] [server: pull3394-b26b7d05] versions incompatible: for untagged builds, server and cli versions should match"

How do I get past this?

Also, I've avoided using the squash command because of the warnings that it may not produce correct results. Can I safely ignore that?

lexi-lambda commented 4 years ago
version check: [cli: pull3394-e47a8c4b] [server: pull3394-b26b7d05] versions incompatible

Ugh… that’s my fault, sorry. When I built that image by hand, I screwed up and put a CLI from a different (but near-identical) build into the base image. I didn’t realize it would be a problem, but I didn’t check myself.

Anyway, I’ve now pushed hasura/graphql-engine:pull3394-e47a8c4b.cli-migrations, which has appropriately-matching versions, so give that a try. Sorry for the back and forth!

Also, I've avoided using the squash command because of the warnings that it may not produce correct results. Can I safely ignore that?

I don’t actually know exactly how dire that warning is, as I don’t work on the CLI, just on the server. I think it’s reasonable to avoid the command for now if you want to play it safe, and maybe @shahidhk or someone else who works on the CLI can chime in about what the caveats are.

flybayer commented 4 years ago

Well, I see one problem with squash — it fails on this project 😏

FATA[0002] unable to squash migrations: error unmarshaling JSON: cannot squash type

With the PR image, I'm now failing on my migrations because of missing environment variables that have since been renamed 😞 Hopefully squash will fix this.

simpleshadow commented 4 years ago

+1 Ended up here trying to deploy hasura/graphql-engine:v1.0.0.cli-migrations to Heroku but environment variables weren't being picked up. Will resort to manual migrations for now.

lexi-lambda commented 4 years ago

I’ve opened #3686 as a stopgap measure to significantly improve the performance of internal server migrations. With that change, a fresh database starts up just fine even on a free Render.com instance! However, it does not affect the performance of user-defined migrations at all, so there’s still work to do there.

Ended up here trying to deploy hasura/graphql-engine:v1.0.0.cli-migrations to Heroku but environment variables weren't being picked up.

@simpleshadow I might be misunderstanding, but that sounds like a separate issue from what @flybayer is describing here. I interpreted his comment to mean that he wasn’t able to run his migrations against a fresh database because older migrations referred to environment variables that he’d since gotten rid of, not that environment variables weren’t being picked up from the environment at all. If you’re experiencing the latter, please open a separate issue to track that!

flybayer commented 4 years ago

I think this can be closed now, unless you have something else planned, @lexi-lambda

lexi-lambda commented 4 years ago

Not anything in the short term. Thanks!

flybayer commented 4 years ago

@lexi-lambda this issue has definitely returned

The following migrations took about 15 minutes on my 2017 Macbook Pro.

1575935901750_create_table_public_shops
1575936101858_alter_table_public_shops_alter_column_created_at
1575936109354_alter_table_public_shops_alter_column_updated_at
1575936385310_create_table_public_shopifyAccount
1575936399860_add_relationship__table_public_shopifyAccount
1575936410964_add_relationship_shopifyAccounts_table_public_undefined
1575936506201_alter_table_public_shopifyAccount_add_unique_shopId
1575936527375_rename_relationship_shopifyAccounts_to_shopifyAccount_schema_public_table_shops
1575936567817_drop_relationship_shopifyAccount_public_table_shops
1575936570272_add_relationship__table_public_shops
1575936907740_add currencyCode to shops
1575937465761_create_table_public_products
1575937474311_alter_table_public_shops_alter_column_id
1575937487386_alter_table_public_shopifyAccount_alter_column_shopId
1575937495967_alter_table_public_products_alter_column_id
1575937512629_set_fk_public_products_shopId
1575937537002_add_relationship_products_table_public_undefined
1575937537894_add_relationship_shop_table_public_undefined
1576014197502_change updated_at trigger to updatedAt
1576018229381_create_table_public_productOptions
1576018286596_add_relationship_product_table_public_undefined
1576018287590_add_relationship_productOptions_table_public_undefined
1576018333321_rename_relationship_productOptions_to_options_schema_public_table_products
1576018659437_create_table_public_productVariants
1576018673048_add_relationship__table_public_productVariants
1576018682384_add_relationship__table_public_products
1576018878029_create_table_public_productOptionValues
1576018991016_set_custom_root_fields_public_shops
1576019008819_rename_table_public_shopifyAccount
1576019039328_set_custom_root_fields_public_shopifyAccounts
1576019068991_set_custom_root_fields_public_products
1576019364733_set_custom_root_fields_public_productVariants
1576019396492_set_custom_root_fields_public_productOptions
1576019452487_set_custom_root_fields_public_productOptionValues
1576019475174_add_relationship__table_public_productOptionValues
1576019477632_add_relationship__table_public_productOptionValues
1576019491586_add_relationship__table_public_productOptions
1576019516051_rename_relationship_productOption_to_option_schema_public_table_productOptionValues
1576019520776_rename_relationship_productVariant_to_variant_schema_public_table_productOptionValues
1576019567404_add_relationship__table_public_productVariants
1576020449812_drop_relationship_variant_public_table_productOptionValues
1576020471132_drop_relationship_selectedValues_public_table_productVariants
1576020477906_delete_fk_public_productOptionValues_productOptionValues_productVariantId_fkey
1576020486614_alter_table_public_productOptionValues_drop_column_productVariantId
1576020919127_create_table_public_variantOptionValues
1576021089116_add_relationship__table_public_variantOptionValues
1576021091820_add_relationship__table_public_variantOptionValues
1576021225043_add_relationship__table_public_productVariants
1576021258876_add_relationship__table_public_productOptionValues
1576021347124_rename_relationship_productOptionValue_to_value_schema_public_table_variantOptionValues
1576021353372_rename_relationship_productVariant_to_variant_schema_public_table_variantOptionValues
1576022291233_create_table_public_mediaItem
1576166735537_create_selectedValues_view
1576166865424_run_sql_migration
1576166870847_run_sql_migration
1576166919627_rename_view_public_selectedvalues
1576166967036_create_relationship_variant_public_table_selectedValues
1576166984317_create_relationship_option_public_table_selectedValues
1576167026706_create_relationship_sv_public_table_productVariants
1576169133177_drop_relationship_selectedValues_public_table_productVariants
1576169140289_rename_relationship_sv_to_selectedValues_schema_public_table_productVariants
1576169365804_set_custom_root_fields_public_variantOptionValues
1576170289571_drop_table_public_mediaItem
1576170326514_create_table_public_images
1576170347173_set_custom_root_fields_public_images
1576170412167_create_table_public_productImages
1576170434465_set_custom_root_fields_public_productImages
1576170458011_add_relationship__table_public_productImages
1576170460816_add_relationship__table_public_productImages
1576170485983_add_relationship__table_public_productVariants
1576170515618_rename_relationship_selectedBy_to_variantOptionValues_schema_public_table_productOptionValues
1576170526517_add_relationship__table_public_images
1576170659802_run_sql_migration
1576170748210_create_relationship_images_public_table_products
1576170834047_rename_table_public_productImages
1576170884926_set_custom_root_fields_public_joinProductImages
1576170895526_rename_view_public_productImagesView
1576170972902_alter_table_public_joinProductImages_add_column_createdAt
1576170998674_rename_table_public_variantOptionValues
1576171031707_set_custom_root_fields_public_joinVariantValues
1576171124054_create_table_public_joinProductVariantImages
1576171158902_set_custom_root_fields_public_joinProductVariantImages
1576171228737_add_relationship__table_public_images
1576171239397_add_relationship__table_public_joinProductVariantImages
1576171242052_add_relationship__table_public_joinProductVariantImages
1576171322584_run_sql_migration
1576171355080_add_relationship__table_public_products
1576171436171_add_relationship__table_public_productVariants
1576171461880_rename_relationship_variantOptionValues_to_joinVariantOptionValues_schema_public_table_productVariants
1576171518557_create_relationship_images_public_table_productVariants
1576171561392_alter_table_public_productOptionValues_add_column_swatch
1576171575756_set_fk_public_productOptionValues_swatch
1576171608975_alter_table_public_productOptionValues_alter_column_swatch
1576171615700_add_relationship__table_public_productOptionValues
1576171679013_create_table_public_joinProductOptionValueImages
1576171717496_set_custom_root_fields_public_joinProductOptionValueImages
1576171728941_add_relationship__table_public_joinProductOptionValueImages
1576171732805_add_relationship__table_public_joinProductOptionValueImages
1576171765184_add_relationship__table_public_images
1576171777197_add_relationship__table_public_images
1576171791147_add_relationship__table_public_productOptionValues
1576171851860_run_sql_migration
1576171879632_create_relationship_images_public_table_productOptionValues
1576171927343_set_custom_root_fields_public_joinProductImages
1576177074948_drop_relationship_selectedValues_public_table_productVariants
1576177085864_drop_view_public_selectedValues
1576177096541_run_sql_migration
1576177114712_drop_view_public_selectedOptions
1576177126665_run_sql_migration
1576177158964_create_relationship_variant_public_table_selectedOptions
1576177173228_create_relationship_option_public_table_selectedOptions
1576177204192_create_relationship_selectedOptions_public_table_productVariants
1576177449759_alter_table_public_productVariants_add_column_inventory
1576177966744_create_table_public_videos
1576178025571_create_table_public_joinProductVideos
1576178060332_set_custom_root_fields_public_joinProductVideos
1576178066325_add_relationship__table_public_joinProductVideos
1576178068630_add_relationship__table_public_joinProductVideos
1576178234868_run_sql_migration
1576178256485_add_relationship__table_public_products
1576178272619_create_relationship_videos_public_table_products
1576178431641_alter_table_public_products_drop_column_compareAtPriceMax
1576178441148_alter_table_public_products_drop_column_compareAtPriceMin
1576178447424_alter_table_public_products_drop_column_priceMax
1576178453141_alter_table_public_products_drop_column_priceMin
1576178938866_alter_table_public_videos_add_column_thumbnailSrc
1576179116268_run_sql_migration
1576179220849_run_sql_migration
1576179503342_run_sql_migration
1576179595997_run_sql_migration
1576179687303_run_sql_migration
1576179951277_run_sql_migration
1576179959342_run_sql_migration
1576269668249_add_relationship_joinProductVideos_table_public_undefined
1576535423106_create_remote_schema_serverlessApollo
1576537020365_create_trigger_importShopify
1576700369669_create_trigger_create_products_from_shopify
1576700649632_create_table_public__standalone_event_triggers
1576700717013_rename_table_public__standalone_event_triggers
1576700750576_delete_trigger_create_products_from_shopify
1576700851059_create_trigger_import_shopify_saveProducts
1576700960933_create_trigger_import_shopify_fetchProducts
1576701018427_delete_trigger_importShopify
1576703608521_modify_tr_import_shopify_fetchProducts_webhook
1576703624757_modify_tr_import_shopify_saveProducts_webhook
1576703645119_modify_tr_import_shopify_saveProducts_webhook
1576776335800_modify_tr_import_shopify_fetchProducts_retry
1576791823096_create_table_public_queue_shopify_fetchProducts
1576791847790_rename_table_public_z_standalone_event_triggers
1576791859165_rename_table_public_queue_shopify_fetchProducts
1576792110554_delete_trigger_import_shopify_saveProducts
1576793412628_create_trigger_shopify_startImport
1576793433044_delete_trigger_import_shopify_fetchProducts
1576793521732_create_trigger_queue_shopify_fetchProducts
1576862101201_create_table_public_x_queue_shopify_fetchProductVariants
1576862233734_create_trigger_queue_shopify_fetchProductVariants
1576863473235_modify_tr_shopify_startImport_retry
1576863483286_modify_tr_queue_shopify_fetchProducts_retry
1576863491351_modify_tr_queue_shopify_fetchProductVariants_retry
1576868312621_alter_table_public_images_add_column_altText
1578006637841_create_table_public_x_cache_shopify_products
1578006855498_create_table_public_x_cache_shopify_productVariants
1578006867682_alter_table_public_x_cache_shopify_products_alter_column_options
1578008617640_alter_table_public_x_cache_shopify_products_alter_column_options
1578008636900_alter_table_public_x_cache_shopify_productVariants_alter_column_images
1578008646868_alter_table_public_x_cache_shopify_productVariants_alter_column_selectedOptions
1578008668655_add_relationship__table_public_x_cache_shopify_products
1578008671585_add_relationship__table_public_x_cache_shopify_products
1578008685246_add_relationship__table_public_x_cache_shopify_productVariants
1578008690769_add_relationship__table_public_x_cache_shopify_productVariants
1578012948920_create_table_public_x_queue_shopify_saveToPlatform
1578013393171_create_trigger_queue_shopify_saveToPlatform
1578025383204_alter_table_public_productOptions_add_column_foreignId
1578026344078_alter_table_public_products_add_column_foreignId
1578088896915_alter_table_public_products_alter_column_title
1578093621754_alter_table_public_productVariants_alter_column_title
1578337857317_create_table_public_x_queue_shopify_transformToPlatform
1578337871049_delete_fk_public_x_queue_shopify_saveToPlatform_x_queue_shopify_saveToPlatform_shopifyAccountId_fkey
1578338036983_create_trigger_queue_shopify_transformToPlatform
1578338480858_alter_table_public_x_queue_shopify_saveToPlatform_drop_column_shopifyAccountId
1578338513787_alter_table_public_x_queue_shopify_saveToPlatform_add_column_products
1578338518558_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_products
1578357302759_alter_table_public_products_add_unique_handle
1578358965635_alter_table_public_shopifyAccounts_add_column_initialSyncState
1578360092434_alter_table_public_x_queue_shopify_saveToPlatform_add_column_shopifyAccountId
1578360097015_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_shopifyAccountId
1578360651386_set_fk_public_productVariants_productId
1578360669381_set_fk_public_productOptions_productId
1578360680352_set_fk_public_productOptionValues_productOptionId
1578360844605_set_fk_public_joinVariantValues_productVariantId
1578360849910_set_fk_public_joinVariantValues_productOptionValueId
1578360868529_set_fk_public_joinProductOptionValueImages_productOptionValueId
1578360872190_set_fk_public_joinProductOptionValueImages_imageId
1578439989394_alter_table_public_images_add_column_foreignId
1578444650983_alter_table_public_x_cache_shopify_products_add_column_images
1578446335493_rename_table_public_joinProductVariantImages
1578446383714_set_custom_root_fields_public_joinVariantImages
1578446790224_rename_view_public_productVariantImages
1578446818329_rename_table_public_joinProductOptionValueImages
1578446835654_rename_view_public_productOptionValueImages
1578447122226_rename_relationship_joinProductVariantImages_to_joinVariantImages_schema_public_table_productVariants
1578447577777_modify_primarykey_public_joinVariantImages
1578447581834_modify_primarykey_public_joinVariantImages
1578447762009_rename_relationship_joinProductOptionValueImages_to_joinOptionValueImages_schema_public_table_productOptionValues
1578595840284_alter_table_public_images_alter_column_thumbnailSrc
1578595848024_alter_table_public_images_alter_column_altText
1578597156909_alter_table_public_x_cache_shopify_products_add_column_title
1578597168144_alter_table_public_x_cache_shopify_productVariants_add_column_title
1578619673491_alter_table_public_shopifyAccounts_add_column_transform
1579040137827_alter_table_public_x_cache_shopify_products_add_column_tags
1579300471149_alter_table_public_productVariants_add_column_metadata
1579546849404_alter_table_public_products_alter_column_handle
1579546875076_alter_table_public_products_add_unique_handle_shopId
1579546905103_alter_table_public_products_add_unique_foreignId_shopId
1579547012314_alter_table_public_productVariants_add_column_shopId
1579547017950_alter_table_public_productVariants_alter_column_shopId
1579547026149_alter_table_public_productVariants_add_unique_foreignId_shopId
1579547390087_set_fk_public_productVariants_shopId
1579547398158_add_relationship__table_public_productVariants
1579547409656_add_relationship__table_public_shops
1579547604055_alter_table_public_productOptions_add_column_shopId
1579547608379_alter_table_public_productOptions_alter_column_shopId
1579547627060_set_fk_public_productOptions_shopId
1579547635092_alter_table_public_productOptions_add_unique_foreignId_shopId
1579547666779_alter_table_public_images_add_column_shopId
1579547670244_alter_table_public_images_alter_column_shopId
1579547700384_alter_table_public_images_add_unique_foreignId_shopId
1579547711891_set_fk_public_images_shopId
1579547735336_add_relationship__table_public_images
1579547740623_add_relationship__table_public_productOptions
1579547800893_add_relationship__table_public_shops
1579547803487_add_relationship__table_public_shops
1579560959905_set_fk_public_joinProductImages_imageId
1579560979954_set_fk_public_joinProductImages_productId
1579560999001_set_fk_public_joinVariantImages_productVariantId
1579561002432_set_fk_public_joinVariantImages_imageId
1579633419989_enabled_citext
1579634171698_change_option_and_values_to_citext
1579634313983_alter_table_public_productOptions_add_unique_title_productId
1579634366926_alter_table_public_productOptionValues_add_unique_title_productOptionId
1579650593738_create_relationship_selectedOptions_public_table_productVariants
1579739150869_alter_table_public_products_drop_column_available
1579739692734_add_computed_available
1579742914872_save_computed_field_undefined_undefined_available
1579742926264_save_computed_field_undefined_undefined_priceMin
1579742938349_save_computed_field_undefined_undefined_priceMax
1579742949878_save_computed_field_undefined_undefined_compareAtPriceMin
1579742957768_save_computed_field_undefined_undefined_compareAtPriceMax
1579807278832_update_permission_build_public_table_shops
1579807418859_remove_roles_public_table_shops
1579807517225_update_permission_admin-build_public_table_shops
1579807640199_update_permission_admin-build_public_table_shopifyAccounts
1579807666311_update_permission_admin-build_public_table_variantImages
1579807671945_update_permission_admin-build_public_table_videos
1579807698709_update_permission_admin-build_public_table_selectedOptions
1579807705921_update_permission_admin-build_public_table_products
1579807714822_update_permission_admin-build_public_table_productVideos
1579807725788_update_permission_admin-build_public_table_productVariants
1579807736005_update_permission_admin-build_public_table_productOptions
1579807742787_update_permission_admin-build_public_table_productOptionValues
1579807748952_update_permission_admin-build_public_table_productImages
1579807755760_update_permission_admin-build_public_table_optionValueImages
1579807761857_update_permission_admin-build_public_table_joinVariantValues
1579807767310_update_permission_admin-build_public_table_joinVariantImages
1579807774320_update_permission_admin-build_public_table_joinProductVideos
1579807780904_update_permission_admin-build_public_table_joinProductImages
1579807789025_update_permission_admin-build_public_table_joinOptionValueImages
1579807795662_update_permission_admin-build_public_table_images
1579807854795_update_permission_admin-build_public_table_products
1579807861038_update_permission_admin-build_public_table_videos
1579808012003_update_permission_admin-build_public_table_variantImages
1579808024164_update_permission_admin-build_public_table_variantImages
1579808047802_update_permission_admin-build_public_table_videos
1579808059624_update_permission_admin-build_public_table_shops
1579808067614_update_permission_admin-build_public_table_shopifyAccounts
1579808073980_update_permission_admin-build_public_table_selectedOptions
1579808079673_update_permission_admin-build_public_table_products
1579808087795_update_permission_admin-build_public_table_productVideos
1579808094814_update_permission_admin-build_public_table_productVariants
1579808100992_update_permission_admin-build_public_table_productOptions
1579808107359_update_permission_admin-build_public_table_productOptionValues
1579808114261_update_permission_admin-build_public_table_productImages
1579808119802_update_permission_admin-build_public_table_optionValueImages
1579808126907_update_permission_admin-build_public_table_joinVariantValues
1579808133826_update_permission_admin-build_public_table_joinVariantImages
1579808143933_update_permission_admin-build_public_table_joinProductVideos
1579808151775_update_permission_admin-build_public_table_joinProductImages
1579808160005_update_permission_admin-build_public_table_joinOptionValueImages
1579808168449_update_permission_admin-build_public_table_images
1579808258592_set_custom_root_fields_public_variantImages
1579808289363_set_custom_root_fields_public_selectedOptions
1579808301154_set_custom_root_fields_public_variantImages
1579808319483_set_custom_root_fields_public_productVideos
1579808326434_set_custom_root_fields_public_selectedOptions
1579808332024_set_custom_root_fields_public_variantImages
1579808347112_set_custom_root_fields_public_productImages
1579808368476_set_custom_root_fields_public_optionValueImages
1579808409787_set_custom_root_fields_public_videos
1579830036739_create_trigger_shopify_setupWebhooks
1579832661174_create_table_public_x_queue_shopify_processProductWebhook
1579832689059_alter_table_public_x_queue_shopify_processProductWebhook_add_column_myshopifyDomain
1579905411975_modify_tr_queue_shopify_fetchProductVariants_retry
1579905421492_modify_tr_queue_shopify_fetchProducts_retry
1579905429066_modify_tr_queue_shopify_fetchProducts_retry
1579905434042_modify_tr_queue_shopify_saveToPlatform_retry
1579905439510_modify_tr_queue_shopify_transformToPlatform_retry
1579905444728_modify_tr_shopify_setupWebhooks_retry
1579905452041_modify_tr_shopify_startImport_retry
1579905578911_create_trigger_queue_shopify_processProductWebhook
1580252736801_alter_table_public_x_queue_shopify_processProductWebhook_add_column_topic
1580252743867_alter_table_public_x_queue_shopify_processProductWebhook_alter_column_topic
1580253047767_set_custom_root_fields_public_x_cache_shopify_productVariants
1580253063273_set_custom_root_fields_public_x_cache_shopify_products
1580253086823_set_custom_root_fields_public_x_queue_shopify_fetchProductVariants
1580253105389_set_custom_root_fields_public_x_queue_shopify_fetchProducts
1580253123443_set_custom_root_fields_public_x_queue_shopify_processProductWebhook
1580336623862_set_custom_root_fields_public_x_queue_shopify_fetchProducts
1580336647570_set_custom_root_fields_public_x_queue_shopify_fetchProducts
1580337961763_set_fk_public_x_cache_shopify_productVariants_productId
1580412467797_alter_table_public_productOptionValues_alter_column_swatch_id
1580512197039_drop_relationship_images_public_table_productVariants
1580512242578_create_relationship_images_public_table_productVariants
1580512277151_drop_relationship_images_public_table_productVariants
1580512292531_create_relationship_images_public_table_productVariants
1580512382145_run_sql_migration
1580512401364_run_sql_migration
1580512426000_run_sql_migration
1580534267518_run_sql_migration
1580534290330_run_sql_migration
1580534307127_run_sql_migration
1580534710434_run_sql_migration
1580534719049_run_sql_migration
1580534727412_run_sql_migration
1580757787459_rename_relationship_productImages_to_joinProductImages_schema_public_table_images
1580757914125_rename_relationship_productVariantImages_to_joinVariantImages_schema_public_table_images
1580757926546_rename_relationship_productOptionValueImages_to_joinOptionValueImages_schema_public_table_images
1580778842936_alter_table_public_productOptions_drop_constraint_productOptions_position_productId_key
1580837296465_create_productOptions_position_unique_deferred
1580940375314_alter_table_public_productOptionValues_drop_constraint_productOptionValues_position_productOptionId_key
1580940455503_create_optionValue_position_unique_constraint
1580945098891_set_fk_public_joinVariantImages_productVariantId
1580945100740_set_fk_public_joinVariantImages_imageId
1580945174742_set_fk_public_joinVariantImages_imageId
1580945176155_set_fk_public_joinVariantImages_productVariantId
1580945214692_set_fk_public_joinVariantImages_productVariantId
1580945216667_set_fk_public_joinVariantImages_imageId
1580945242545_set_fk_public_joinVariantImages_productVariantId
1580945244204_set_fk_public_joinVariantImages_imageId
1580945315235_set_fk_public_joinVariantValues_productOptionValueId
1580945321962_set_fk_public_joinVariantValues_productVariantId
1580945328885_set_fk_public_joinProductVideos_videoId
1580945334568_set_fk_public_joinProductVideos_videoId
1580945354435_set_fk_public_joinVariantValues_productOptionValueId
1580945357771_set_fk_public_joinVariantValues_productVariantId
1580945364815_set_fk_public_joinVariantImages_imageId
1580945369271_set_fk_public_joinVariantImages_productVariantId
1580945376775_set_fk_public_joinProductVideos_videoId
1580945379487_set_fk_public_joinProductVideos_productId
1580945788362_set_fk_public_joinVariantValues_productOptionValueId
1580945797879_set_fk_public_joinVariantImages_imageId
1580945808615_set_fk_public_joinProductVideos_videoId
1580945813781_set_fk_public_joinProductImages_imageId
1580945822475_set_fk_public_joinOptionValueImages_imageId
1580967033240_set_fk_public_joinVariantValues_productOptionValueId
1581018969074_alter_table_public_x_queue_shopify_saveToPlatform_add_column_shopId
1581018974196_alter_table_public_x_queue_shopify_saveToPlatform_alter_column_shopId
1581463810302_alter_table_public_productVariants_add_column_productForeignId
1581552463545_create_restrict_pending_queue_size
1581552868610_create_ignore_inserts_if_greater_than_max_pending_queue_size
1581552983507_create_ignore_inserts_if_greater_than_max_pending_queue_size
1581617476748_transformToPlatform_create_ignore_inserts_if_greater_than_max_pending_queue_size
1581620002419_alter_table_public_shopifyAccounts_add_check_constraint_id_not_blank
1581620040115_alter_table_public_x_cache_shopify_productVariants_add_check_constraint_shopifyAccountId_not_blank
1581620057284_alter_table_public_x_cache_shopify_products_add_check_constraint_shopifyAccountId_not_blank
1581620074037_alter_table_public_x_queue_shopify_fetchProductVariants_add_check_constraint_shopifyAccountId_not_blank
1581620089944_alter_table_public_x_queue_shopify_fetchProducts_add_check_constraint_shopifyAccountId_not_blank
1581620112768_alter_table_public_x_queue_shopify_processProductWebhook_add_check_constraint_myshopifyDomain_not_blank
1581620127249_alter_table_public_x_queue_shopify_saveToPlatform_add_check_constraint_shopifyAccountId_not_blank
1581620141582_alter_table_public_x_queue_shopify_transformToPlatform_add_check_constraint_shopifyAccountId_not_blank
1581620615749_fix_restrict_pending_queue_size
1581620693571_fix_restrict_pending_queue_size
1581622344626_create_touch_product
1581629031634_create_touch_product
1581629058629_run_sql_migration
1581629372958_create_touch_product
1581629400368_create_trigger_touch_parent_product_on_options
1581632262820_create_touch_parent_option_product
1581632295048_create_trigger_touch_parent_option_product_on_optionvalues
1581636394962_fix_restrict_pending_queue_size
1581636432769_fix_restrict_pending_queue_size
1581636656476_fix_restrict_pending_queue_size
1581636781176_fix_restrict_pending_queue_size
1581636855855_fix_restrict_pending_queue_size
1581637071946_change_restrict_pending_queue_size_to_update
1581637145251_change_restrict_pending_queue_size_to_update
1581637180486_change_restrict_pending_queue_size_to_update
1581637202075_change_restrict_pending_queue_size_to_update
1581640105468_add_restrict_pending_queue_size_to_savetoplatform
1581640214215_delete_trigger_public_ignore_inserts_if_greater_than_max_pending_queue_size
1581640225794_add_trigger_enforce_max_pending_queue_size
1581640450073_delete_trigger_public_enforce_max_pending_queue_size
1581640469160_fix_enforce_max_pending_queue_size
1581708395818_fix_touch_parent_product
1581718522196_create_table_public_x_queue_shopify_syncToShopify
1581718539019_alter_table_public_x_queue_shopify_syncToShopify_add_check_constraint_shopifyAccountId_not_blank
1581718943576_create_trigger_queue_shopify_syncToShopify
1581723030372_alter_table_public_shopifyAccounts_add_column_sharedSecret
1581723646000_alter_table_public_shopifyAccounts_alter_column_sharedSecret
1581726944141_delete_trigger_public_set_public_shops_updated_at
1581727040749_fix_shop_updated_at
1582228983176_alter_table_public_x_cache_shopify_products_add_column_sku
1582228989558_alter_table_public_x_cache_shopify_products_drop_column_sku
1582229125962_alter_table_public_x_cache_shopify_products_add_column_createdAt
1582229140007_alter_table_public_x_cache_shopify_products_add_column_updatedAt
1582229167422_alter_table_public_x_cache_shopify_productVariants_add_column_sku
1582229181208_alter_table_public_x_cache_shopify_productVariants_add_column_foreignCreatedAt
1582229191059_alter_table_public_x_cache_shopify_productVariants_add_column_foreignUpdatedAt
1582235773208_alter_table_public_x_cache_shopify_productVariants_alter_column_foreignCreatedAt
1582235779770_alter_table_public_x_cache_shopify_productVariants_alter_column_foreignUpdatedAt
1582235805737_alter_table_public_products_add_column_foreignCreatedAt
1582235814927_alter_table_public_products_add_column_foreignUpdatedAt
1582235826414_alter_table_public_productVariants_add_column_foreignCreatedAt
1582235834393_alter_table_public_productVariants_add_column_foreignUpdatedAt
1582235848084_alter_table_public_productVariants_add_column_sku
1582236052714_create_relationship_product_public_table_images
1582236069089_create_relationship_variant_public_table_images
1582236091119_create_relationship_optionValue_public_table_images