Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
feat: added country column in users table
Browse files Browse the repository at this point in the history
  • Loading branch information
vycdev committed Jul 11, 2020
1 parent 712a103 commit d141681
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/api/db/migrations/20200711211052_create_country_column.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Knex from "knex";

export const up = async (knex: Knex) => {
return knex.schema.table("users", table => {
table
.string("country")
.notNullable()
.defaultTo("");
});
};

export const down = async (knex: Knex) => {
return knex.schema.table("users", table => {
return table.dropColumn("country");
});
};

0 comments on commit d141681

Please sign in to comment.