2023-12-25 20:12:44 +00:00
|
|
|
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();
|
2024-02-01 07:18:52 +00:00
|
|
|
table.string("friendlyname", 255);
|
2023-12-25 20:12:44 +00:00
|
|
|
table.boolean("active").notNullable().defaultTo(true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function down(knex: Knex): Promise<void> {
|
|
|
|
return knex.schema.dropTable("agent");
|
|
|
|
}
|