Skip to content

Commit

Permalink
fix: Use JSON instead of JSONB (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Jul 12, 2024
1 parent 00c1e5a commit 5396d43
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions migrations/1720815210066_json-item-mapping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { MigrationBuilder } from 'node-pg-migrate'
import { Item } from '../src/Item'

const column = 'mappings'

export async function up(pgm: MigrationBuilder): Promise<void> {
pgm.alterColumn(Item.tableName, column, {
type: 'json',
})
}

export async function down(pgm: MigrationBuilder): Promise<void> {
pgm.alterColumn(Item.tableName, column, {
type: 'jsonb',
})
}

0 comments on commit 5396d43

Please sign in to comment.