mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
e7fba40fad
Added a boilerplate from [this original repository](https://github.com/platyplus/authentication-server) based on the discussions in [this issue](https://github.com/hasura/graphql-engine/issues/1420) and [this issue](https://github.com/hasura/graphql-engine/issues/1446). [skip ci]
18 lines
359 B
JavaScript
18 lines
359 B
JavaScript
exports.up = function(knex, Promise) {
|
|
return knex.schema.createTable('role', table => {
|
|
table
|
|
.uuid('id')
|
|
.primary()
|
|
.unique()
|
|
.defaultTo(knex.raw('gen_random_uuid()'))
|
|
table
|
|
.string('name')
|
|
.unique()
|
|
.notNullable()
|
|
})
|
|
}
|
|
|
|
exports.down = function(knex, Promise) {
|
|
return knex.schema.dropTable('role')
|
|
}
|