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

demonstrate alterTable and addColumn in example migration #733

Merged

Conversation

peterbecich
Copy link
Contributor

This PR improves the V0002 example migration to include a demo of alterTable and addColumn.

The example already demonstrated the preserve function but not these two other functions.

Now the V0002 migration additionally adds a salary field to Staff.

Here is the addition to the migration, rendered to SQL:

SQL command type: PgCommandTypeDdl
SQL script: 
ALTER TABLE "staff" ADD COLUMN "salary" SMALLINT DEFAULT 100 NOT NULL

Printing this depends on #732

@LaurentRDC
Copy link
Member

Good idea, thanks!

@LaurentRDC LaurentRDC merged commit df0080e into haskell-beam:master Dec 24, 2024
8 checks passed
@peterbecich peterbecich deleted the demonstrate-alter-table-in-example branch December 25, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants