We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48e15bb commit 203fe08Copy full SHA for 203fe08
1 file changed
cmstestsuite/unit_tests/schema_diff_test.py
@@ -131,6 +131,14 @@ def run_pg_dump() -> str:
131
def get_updated_schema(schema_file: str, updater_file: str) -> str:
132
drop_db()
133
schema_sql = open(schema_file).read()
134
+ # The schema sets the owner of every object explicitly. We actually want
135
+ # these objects to be owned by whichever user CMS uses, so we skip the
136
+ # OWNER TO commands and let the owners be defaulted to the current user.
137
+ schema_sql = '\n'.join(
138
+ line
139
+ for line in schema_sql.splitlines()
140
+ if not (line.startswith('ALTER ') and ' OWNER TO ' in line)
141
+ )
142
updater_sql = open(updater_file).read()
143
# We need to do this in two separate connections, since the schema_sql sets
144
# some connection properties which we don't want.
0 commit comments