Last active
April 5, 2020 14:06
-
-
Save nemrosim/8483d746c1c7a18522b96c69d58f0980 to your computer and use it in GitHub Desktop.
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
const Schema = use('Schema'); | |
class ProfileSchema extends Schema { | |
up () { | |
this.create('profiles', (table) => { | |
table.increments(); | |
table.integer('user_id') | |
.unsigned() | |
.references('id') | |
.inTable('users') | |
.notNullable(); | |
table.string('name', 254); | |
table.string('surname', 254); | |
table.string('patronymic', 254); | |
table.date('date_of_birth'); | |
table.timestamps(); | |
}); | |
} | |
down () { | |
this.drop('profiles'); | |
} | |
} | |
module.exports = ProfileSchema; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment