SL
Size: a a a
SL
SL
IK
IK
IK
SL
SL
SL
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
import { Element } from 'src/element/element.entity';
export class Initial1586032967331 implements MigrationInterface {
name = 'Initial1586032967331';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'element',
columns: [
{
name: 'id',
type: 'int',
isPrimary: true,
},
{
name: 'name',
type: 'varchar',
},
],
}),
true,
);
const connection = queryRunner.connection;
const element1 = new Element();
element1.name = 'Topper Standard 1';
await connection.manager.save(element1);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable('element');
}
}SL
SL
SL
IK
IK
SL
SL
IK