Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
All null profile ids for messages and replies
Browse files Browse the repository at this point in the history
  • Loading branch information
joesaunderson committed Apr 5, 2022
1 parent 48ee74c commit 11df077
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions migrations/1649193014422_allow-null-profile-ids.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable camelcase */

exports.shorthands = undefined

exports.up = (pgm) => {
pgm.alterColumn({ schema: 'public', name: 'squeak_messages' }, 'profile_id', {
type: 'bigint',
references: { schema: 'public', name: 'squeak_profiles' },
referencesConstraintName: 'messages_profile_id_fkey',
allowNull: true,
})

pgm.alterColumn({ schema: 'public', name: 'squeak_replies' }, 'profile_id', {
type: 'bigint',
references: { schema: 'public', name: 'squeak_profiles' },
referencesConstraintName: 'replies_profile_id_fkey',
allowNull: true,
})
}

0 comments on commit 11df077

Please sign in to comment.