diff --git a/hasura/migrations/1730521661838_run_sql_migration/down.sql b/hasura/migrations/1730521661838_run_sql_migration/down.sql new file mode 100644 index 000000000..87ca7ff08 --- /dev/null +++ b/hasura/migrations/1730521661838_run_sql_migration/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- CREATE index idx_messages_unread_agg ON messages (read, isoutbound) +-- WHERE read = false AND isoutbound = false; diff --git a/hasura/migrations/1730521661838_run_sql_migration/up.sql b/hasura/migrations/1730521661838_run_sql_migration/up.sql new file mode 100644 index 000000000..e3728cb7f --- /dev/null +++ b/hasura/migrations/1730521661838_run_sql_migration/up.sql @@ -0,0 +1,2 @@ +CREATE index idx_messages_unread_agg ON messages (read, isoutbound) +WHERE read = false AND isoutbound = false;