Resourcemanagement/db/knex_migrations/2026-10-23-0000-add-aws-account.js
vickytechkey ec8ab87996
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 44s
fix(aws): alter aws_account.user_id to varchar(255) for better-auth compatibility
2026-10-23 21:09:52 +05:30

23 lines
880 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.string("user_id", 255).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");
}
};