Skip to content

Instantly share code, notes, and snippets.

@nemrosim
Last active April 5, 2020 14:06
Show Gist options
  • Save nemrosim/8483d746c1c7a18522b96c69d58f0980 to your computer and use it in GitHub Desktop.
Save nemrosim/8483d746c1c7a18522b96c69d58f0980 to your computer and use it in GitHub Desktop.
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