Commit 48c6741f authored by Micaël Bergeron's avatar Micaël Bergeron

remove the `is_nullable` definition from the schema_diff

we are not mutating the schemas anyways with that information
so I've just removed it for now.
parent e2d22281
......@@ -85,11 +85,9 @@ class Schema:
if column.is_mapping_key and not db_col.is_mapping_key:
return {SchemaDiff.COLUMN_MAPPING_KEY_MISSING}
if column.data_type != db_col.data_type \
or column.is_nullable != db_col.is_nullable:
if column.data_type != db_col.data_type:
return {SchemaDiff.COLUMN_CHANGED}
return {SchemaDiff.COLUMN_OK}
......@@ -192,7 +190,7 @@ def schema_apply_column(db_cursor,
logging.debug("[{}]: {}".format(column.column_name, diff))
if SchemaDiff.COLUMN_CHANGED in diff:
raise InapplicableChangeError(diff)
raise InapplicableChangeError("{}: {}".format(column, diff))
if SchemaDiff.TABLE_MISSING in diff:
stmt = "CREATE TABLE {}.{} ({} SERIAL PRIMARY KEY)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment