Mais alterações em usuários
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||||
|
||||
export class RemoveCpfAndCnpjFieldsFromUsersTable1655711281662
|
||||
implements MigrationInterface
|
||||
{
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.dropColumns('users', ['cnpj', 'cpf']);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.addColumns('users', [
|
||||
new TableColumn({
|
||||
name: 'cpf',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: 'cnpj',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
||||
|
||||
export class AddDocumentAndDocumentTypeFieldsToUsersTable1655711315251
|
||||
implements MigrationInterface
|
||||
{
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.addColumns('users', [
|
||||
new TableColumn({
|
||||
name: 'document',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: 'document_type',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.dropColumns('users', ['document_type', 'document']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user