-
Notifications
You must be signed in to change notification settings - Fork 5
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 #256 from developmentseed/feature/badges-frontend
Add badges management to organization view
- Loading branch information
Showing
17 changed files
with
842 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
exports.up = async function (knex) { | ||
await knex.schema.createTable('user_badge', (table) => { | ||
await knex.schema.createTable('user_badges', (table) => { | ||
table | ||
.integer('badge_id') | ||
.references('id') | ||
.inTable('organization_badge') | ||
.onDelete('CASCADE') | ||
table | ||
.integer('user_id') | ||
.references('id') | ||
.inTable('organization_badge') | ||
.onDelete('CASCADE') | ||
table.integer('user_id') | ||
table.datetime('assigned_at').defaultTo(knex.fn.now()) | ||
table.datetime('valid_until') | ||
table.unique(['badge_id', 'user_id']) | ||
}) | ||
} | ||
|
||
exports.down = async function (knex) { | ||
await knex.schema.dropTable('user_badge') | ||
await knex.schema.dropTable('user_badges') | ||
} |
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
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.