correct way to use .alter to update element event.Event datatype #1275
-
Hi all, As discussed on slack, I’m currently facing a quantization issue with the old Elements I see that We therefore have to change the datatype safely post-hoc in our rather large database. However, running on test data, I fail to get the What’s the correct way to use .alter() here? thanks, What I tried I changed the event.Event schema definition from
Then loaded an old test database
Event.describe() shows float as it should: However, restarting the kernel and then using
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Can you try it the other way around: schema = dj.Schema('tobiasrext_event')
schema.spawn_missing_classes()
@schema
class Event(dj.Imported):
definition = """
-> BehaviorRecording
-> EventType
event_start_time : decimal(10, 4)
---
event_end_time=null : double
"""
Event.alter() |
Beta Was this translation helpful? Give feedback.
-
Great - this sequence works. Thanks - But see below. |
Beta Was this translation helpful? Give feedback.
-
Done. For future reference, this is what I did and where I initially struggled:
For the note: decimal(11,5) is overkill (11.57 d at 10us resolution) but was necessary since we had bursty lick events that led to key duplication at decimal(10,4). |
Beta Was this translation helpful? Give feedback.
Done. For future reference, this is what I did and where I initially struggled:
ALGORITHM=COPY
)