Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please elaborate on modifying table definitions in the docs? #1048

Open
FlorianNeurosci opened this issue Aug 26, 2022 · 2 comments
Labels
Docs Issues related to documentation enhancement

Comments

@FlorianNeurosci
Copy link

Feature Request

Problem

In the documentation under "Table definition" it says that "It is possible to modify a table without dropping it. This topic is covered separately.". I tried to search but I cannot find the topic being covered elsewhere, so I was wondering if you could kindly elaborate on the topic and maybe link it there?

Justification

It would be very nice to retrospectively be able to modify table definitions without dropping them altogether

Thank you very much!

@CBroz1
Copy link
Contributor

CBroz1 commented Aug 26, 2022

Duplicate issue on datajoint-docs?

If I recall correctly, alter will let you modify the secondary attributes of a table. You can do this by modifying your local table definition, loading that into the current namespace and then running schema.Table.alter(). This should update the SQL representation of the table to reflect what's in your script. Although, this should be done with caution - I'm not clear on how this would impact existing data that, for example, did not match the new definition's data type.

@jverswijver jverswijver added Docs Issues related to documentation and removed awaiting-triage labels Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Issues related to documentation enhancement
Projects
None yet
Development

No branches or pull requests

4 participants