改进
This commit is contained in:
parent
3f28963e1e
commit
c71484419f
28
src/migration/1698126666203-create_users_table.ts
Normal file
28
src/migration/1698126666203-create_users_table.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import {MigrationInterface, QueryRunner, Table, TableIndex} from "typeorm"
|
||||||
|
|
||||||
|
export class CreateUsersTable1698126666203 implements MigrationInterface {
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.createTable(
|
||||||
|
new Table({
|
||||||
|
name: "users",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
name: "id",
|
||||||
|
type: "unsignedint",
|
||||||
|
isPrimary: true,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// await queryRunner.createIndex("users", new TableIndex({
|
||||||
|
// columnNames: [""],
|
||||||
|
// name: "IDX_USER_FIRST_NAME"
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user