Skip to content

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