text: const { MigrationInterface, QueryRunner, Table } = require('typeorm');
   
  module.export = class initialSchema1625847615203 {
    
    async up(queryRunner) {
      await queryRunner.createTable(
        new Table({
          name: 'user',
          columns: [
            {
              name: 'id',
              type: 'integer',
              isPrimary: true,
              isGenerated: true,
              generationStrategy: 'increment',
            },
            {
              name: 'email',
              type: 'varchar',
            },
            {
              name: 'password',
              type: 'varchar',
            },
            {
              name: 'admin',
              type: 'boolean',
              default: 'true',
            },
          ],
        }),
      );
   
      await queryRunner.createTable(
        new Table({
          name: 'place',
          columns: [
            {
              name: 'id',
              type: 'integer',
              isPrimary: true,
              isGenerated: true,
              generationStrategy: 'increment',
            },
            { name: 'approved', type: 'boolean', default: 'false' },
            { name: 'price', type: 'float' },
            { name: 'make', type: 'varchar' },
            { name: 'model', type: 'varchar' },
            { name: 'year', type: 'integer' },
            { name: 'long', type: 'float' },
            { name: 'lat', type: 'float' },
            { name: 'mileage', type: 'integer' },
            { name: 'userId', type: 'integer' },
          ],
        }),
      );
    }
   
    async down(queryRunner) {
      await queryRunner.query(`DROP TABLE ""place""`);
      await queryRunner.query(`DROP TABLE ""user""`);
    }
  };