Skip to content

Instantly share code, notes, and snippets.

@KevinStrong
Last active February 15, 2022 00:39
Show Gist options
  • Save KevinStrong/4fe413e30ce4fd45a47eac3a334bb85b to your computer and use it in GitHub Desktop.
Save KevinStrong/4fe413e30ce4fd45a47eac3a334bb85b to your computer and use it in GitHub Desktop.
Create a join table between kiosks and events
databaseChangeLog:
- changeSet:
- id: 3-create-join-table
author: [email protected]
changes:
- createTable:
tableName: kiosk_events
remarks: A join table between kiosks and events
schemaName: checkin
columns:
- column:
name: kiosk_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: fk_kiosk_id
references: checkin.kiosks(id)
- column:
name: event_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: fk_event_id
references: checkin.events(id)
- addPrimaryKey:
schemaName: checkin
tableName: kiosk_events
constraintName: pk_kiosk_events
columnNames: kiosk_id, event_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment