All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 14s
23 lines
887 B
JavaScript
23 lines
887 B
JavaScript
exports.up = async (knex) => {
|
|
const hasTable = await knex.schema.hasTable("aws_account");
|
|
if (!hasTable) {
|
|
await knex.schema.createTable("aws_account", (table) => {
|
|
table.increments("id").primary();
|
|
table.string("name", 255).notNullable();
|
|
table.string("auth_type", 64).defaultTo("keys");
|
|
table.string("access_key_id", 255).nullable();
|
|
table.text("secret_access_key").nullable();
|
|
table.text("session_token").nullable();
|
|
table.string("region", 64).defaultTo("us-east-1");
|
|
table.integer("user_id").unsigned().nullable();
|
|
table.dateTime("created_date").nullable();
|
|
});
|
|
}
|
|
};
|
|
|
|
exports.down = async (knex) => {
|
|
const hasTable = await knex.schema.hasTable("aws_account");
|
|
if (hasTable) {
|
|
await knex.schema.dropTable("aws_account");
|
|
}
|
|
};
|