-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow ranking posts inside collection
- Loading branch information
Showing
14 changed files
with
387 additions
and
8 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
plugins/qeta-backend/migrations/20243110_collection-post-ranking.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,17 @@ | ||
/** | ||
* @param {import('knex').Knex} knex | ||
*/ | ||
exports.up = async function up(knex) { | ||
await knex.schema.alterTable('collection_posts', table => { | ||
table.increments('rank', { primaryKey: false }); | ||
}); | ||
}; | ||
|
||
/** | ||
* @param {import('knex').Knex} knex | ||
*/ | ||
exports.down = async function down(knex) { | ||
await knex.schema.alterTable('collection_posts', table => { | ||
table.dropColumn('rank'); | ||
}); | ||
}; |
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
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
Oops, something went wrong.