-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4251 from thematters/develop
Release: v5.6.1
- Loading branch information
Showing
48 changed files
with
2,379 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const { alterEnumString } = require('../utils') | ||
|
||
const table = 'transaction' | ||
|
||
exports.up = async (knex) => { | ||
await knex.raw( | ||
alterEnumString(table, 'purpose', [ | ||
'donation', | ||
'add-credit', | ||
'refund', | ||
'payout', | ||
'subscription', | ||
'subscription-split', | ||
'dispute', | ||
'payout-reversal', | ||
'curation-vault-withdrawal', | ||
]) | ||
) | ||
} | ||
|
||
exports.down = async (knex) => { | ||
await knex.raw( | ||
alterEnumString(table, 'purpose', [ | ||
'donation', | ||
'add-credit', | ||
'refund', | ||
'payout', | ||
'subscription', | ||
'subscription-split', | ||
'dispute', | ||
'payout-reversal', | ||
]) | ||
) | ||
} |
19 changes: 19 additions & 0 deletions
19
db/migrations/20241204160111_alter_blockchain_curation_event.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const table = 'blockchain_curation_event' | ||
|
||
exports.up = async (knex) => { | ||
await knex.schema.alterTable(table, (t) => { | ||
t.bigInteger('creator_id').unsigned() | ||
t.string('creator_address').nullable().alter() | ||
|
||
t.foreign('creator_id').references('id').inTable('user') | ||
|
||
t.index('creator_id') | ||
}) | ||
} | ||
|
||
exports.down = async (knex) => { | ||
await knex.schema.alterTable(table, (t) => { | ||
t.dropColumn('creator_id') | ||
t.string('creator_address').notNullable().alter() | ||
}) | ||
} |
18 changes: 18 additions & 0 deletions
18
db/migrations/20241210211824_add_campaign_article_announcement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const table = 'campaign_article' | ||
|
||
exports.up = async (knex) => { | ||
await knex.schema.table(table, function (t) { | ||
t.boolean('announcement').defaultTo(false) | ||
}) | ||
|
||
// migrate records that `campaign_stage_id` is null | ||
await knex(table) | ||
.whereNull('campaign_stage_id') | ||
.update({ announcement: true }) | ||
} | ||
|
||
exports.down = async (knex) => { | ||
await knex.schema.table(table, function (t) { | ||
t.dropColumn('announcement') | ||
}) | ||
} |
Oops, something went wrong.