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

Add documentation for altering populated pipelines #1157

Open
sreguyal opened this issue Apr 16, 2024 · 1 comment
Open

Add documentation for altering populated pipelines #1157

sreguyal opened this issue Apr 16, 2024 · 1 comment
Assignees

Comments

@sreguyal
Copy link

Feature Request

Problem

Looking for documentation for the alter command. The relevant page in the DataJoint documentation (Schema Design > Schema Modification > Altering Populated Pipelines) is currently blank.

@kushalbakshi
Copy link
Contributor

Hi @sreguyal, thank you for your patience with this. We're going through a round of updates to our documentation. The draft PR #1197 contains information about this if you're needing to use alter(). Here's the snippet from the documentation that will be most useful for you:

Let's say we have a table Student with the following attributes:

@schema
class Student(dj.Manual):
    definition = """
    student_id: int
    ---
    first_name: varchar(40)
    last_name: varchar(40)
    home_address: varchar(100)
    """

We can modify the table to include a new attribute email:

Student.definition = """
student_id: int
---
first_name: varchar(40)
last_name: varchar(40)
home_address: varchar(100)
email: varchar(100)
"""
Student.alter()

alter() currently does not work for updating primary key attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants