File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -202,31 +202,31 @@ def build_clock_table(entity_table: sa.Table,
202
202
server_default = sa .func .current_timestamp ()),
203
203
schema = schema )
204
204
205
- entity_keys = set ()
205
+ entity_keys = list ()
206
206
for fk in util .foreign_key_to (entity_table , nullable = False ):
207
207
# this is done to support arbitrary primary key shape on entity
208
208
clock_table .append_column (fk )
209
- entity_keys .add (fk .key )
209
+ entity_keys .append (fk .key )
210
210
211
211
tick_entity_unique_name = util .truncate_identifier (
212
212
'%s_tick_entity_id_key' % clock_table_name
213
213
)
214
214
clock_table .append_constraint (
215
- sa .UniqueConstraint (* (entity_keys | { 'tick' } ),
215
+ sa .UniqueConstraint (* (entity_keys + [ 'tick' ] ),
216
216
name = tick_entity_unique_name )
217
217
)
218
218
219
219
if activity_class :
220
- activity_keys = set ()
220
+ activity_keys = list ()
221
221
# support arbitrary shaped activity primary keys
222
222
for fk in util .foreign_key_to (activity_class .__table__ ,
223
223
prefix = 'activity' ,
224
224
nullable = False ):
225
225
clock_table .append_column (fk )
226
- activity_keys .add (fk .key )
226
+ activity_keys .append (fk .key )
227
227
# ensure we have DB constraint on clock <> activity uniqueness
228
228
clock_table .append_constraint (
229
- sa .UniqueConstraint (* (activity_keys | entity_keys ))
229
+ sa .UniqueConstraint (* (entity_keys + activity_keys ))
230
230
)
231
231
232
232
return clock_table
You can’t perform that action at this time.
0 commit comments