Skip to content

Commit c3ddbc9

Browse files
committed
Update references in runtime and parameter definitions to allow null values
1 parent f17379e commit c3ddbc9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

db/migrate/20250525192143_implement_generics.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,28 @@ def change
5454
end
5555

5656
remove_reference :runtime_function_definitions, :return_type,
57+
null: true,
5758
foreign_key: { to_table: :data_types, on_delete: :restrict }
5859
add_reference :runtime_function_definitions, :return_type,
5960
foreign_key: { to_table: :data_type_identifiers, on_delete: :restrict }, null: true
6061

6162
add_column :runtime_function_definitions, :generic_keys, 'text[]', null: false, default: []
6263

6364
remove_reference :runtime_parameter_definitions, :data_type,
65+
null: true,
6466
foreign_key: { to_table: :data_types, on_delete: :restrict }
6567
add_reference :runtime_parameter_definitions, :data_type,
6668
foreign_key: { to_table: :data_type_identifiers, on_delete: :restrict }, null: true
6769

68-
remove_reference :parameter_definitions, :data_type, foreign_key: { to_table: :data_types, on_delete: :restrict }
70+
remove_reference :parameter_definitions, :data_type,
71+
null: true,
72+
foreign_key: { to_table: :data_types, on_delete: :restrict }
6973
add_reference :parameter_definitions, :data_type,
7074
foreign_key: { to_table: :data_type_identifiers, on_delete: :restrict }, null: true
7175

72-
remove_reference :function_definitions, :return_type, foreign_key: { to_table: :data_types, on_delete: :restrict }
76+
remove_reference :function_definitions, :return_type,
77+
null: true,
78+
foreign_key: { to_table: :data_types, on_delete: :restrict }
7379
add_reference :function_definitions, :return_type,
7480
foreign_key: { to_table: :data_type_identifiers, on_delete: :restrict }, null: true
7581

0 commit comments

Comments
 (0)