dockge/backend/migrations/2023-12-20-2117-agent-table.ts
stroskler 825b72761b fix: pull-request suggestions
updating the merge request by adding the suggestions from reviewer
2024-08-06 16:04:11 +00:00

17 lines
575 B
TypeScript

import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
// Create the user table
return knex.schema.createTable("agent", (table) => {
table.increments("id");
table.string("url", 255).notNullable().unique();
table.string("username", 255).notNullable();
table.string("password", 255).notNullable();
table.string("name", 255);
table.boolean("active").notNullable().defaultTo(true);
});
}
export async function down(knex: Knex): Promise<void> {
return knex.schema.dropTable("agent");
}