You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
supabase db diff command gives an error when creating a migration on db that contains partition table. A new partition table is generated every month and for incremental migrations, it is creating an issue.
To Reproduce
Steps to reproduce the behavior:
Create a db with partition table
dump it and create the first migration
create another table in that partition table
run supabase db diff (to create a new migration)
Expected behavior
A new migration file with the updated changes should be created.
System information
Version of CLI: Tried with both v1.226.4 and v2.0.0
Version of Docker: v27.3.1
Error Log
error diffing schema: error running container: exit 1:
Traceback (most recent call last):
File "/usr/local/bin/migra", line 8, in
sys.exit(do_command())
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 121, in do_command
status = run(args)
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 98, in run
m.add_all_changes(privileges=args.with_privileges)
File "/usr/local/lib/python3.9/site-packages/migra/migra.py", line 107, in add_all_changes
self.add(self.changes.tables_only_selectables())
File "/usr/local/lib/python3.9/site-packages/migra/changes.py", line 496, in get_selectable_changes
statements += get_table_changes(
File "/usr/local/lib/python3.9/site-packages/migra/changes.py", line 233, in get_table_changes
rls_alter = v.alter_rls_statement
File "/usr/local/lib/python3.9/site-packages/schemainspect/pg/obj.py", line 228, in alter_rls_statement
return self.alter_table_statement(self.alter_rls_clause)
File "/usr/local/lib/python3.9/site-packages/schemainspect/pg/obj.py", line 145, in alter_table_statement
raise NotImplementedError # pragma: no cover
NotImplementedError
Additional context
Seems like migra tool is creating an issue on policies. But happening only with partition table. It works fine if the tables are not partitioned.
The text was updated successfully, but these errors were encountered:
Describe the bug
supabase db diff command gives an error when creating a migration on db that contains partition table. A new partition table is generated every month and for incremental migrations, it is creating an issue.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A new migration file with the updated changes should be created.
System information
Error Log
error diffing schema: error running container: exit 1:
Traceback (most recent call last):
File "/usr/local/bin/migra", line 8, in
sys.exit(do_command())
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 121, in do_command
status = run(args)
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 98, in run
m.add_all_changes(privileges=args.with_privileges)
File "/usr/local/lib/python3.9/site-packages/migra/migra.py", line 107, in add_all_changes
self.add(self.changes.tables_only_selectables())
File "/usr/local/lib/python3.9/site-packages/migra/changes.py", line 496, in get_selectable_changes
statements += get_table_changes(
File "/usr/local/lib/python3.9/site-packages/migra/changes.py", line 233, in get_table_changes
rls_alter = v.alter_rls_statement
File "/usr/local/lib/python3.9/site-packages/schemainspect/pg/obj.py", line 228, in alter_rls_statement
return self.alter_table_statement(self.alter_rls_clause)
File "/usr/local/lib/python3.9/site-packages/schemainspect/pg/obj.py", line 145, in alter_table_statement
raise NotImplementedError # pragma: no cover
NotImplementedError
Additional context
Seems like migra tool is creating an issue on policies. But happening only with partition table. It works fine if the tables are not partitioned.
The text was updated successfully, but these errors were encountered: