title: TypeORM does not create tables, columns etc
body: <p>I have set up a system with typeorm (<a href="https://github.com/typeorm/typeorm" rel="noreferrer">https://github.com/typeorm/typeorm</a>) and NestJs (<a href="https://github.com/nestjs/nest" rel="noreferrer">https://github.com/nestjs/nest</a>), but TypeORM isn't creating the tables or columns. My setup is like this:</p>
  <pre class="lang-js prettyprint-override"><code>import {UserPassword} from '../user/user-password.entity';
  import {User} from '../user/user.entity';
  
  createConnection({
      type: 'mysql',
      host: 'typeorm2.cn32tstd6wqk.eu-central-1.rds.amazonaws.com',
      port: 1234,
      username: 'username',
      password: 'password',
      database: 'dbname',
      entities: [
        // __dirname + '/../**/*.entity{.ts,.js}'
        UserPassword,
        User
      ]
    })
  </code></pre>
  <p>And the entities are:</p>
  <pre class="lang-ts prettyprint-override"><code>import {Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn} from 'typeorm';
  
  @Entity()
  export class UserPassword {
  
    @PrimaryGeneratedColumn()
    id: number;
  
    @Column()
    hash: string;
  
    @Column()
    algorithm: string;
  
  }
  </code></pre>
  <p>and</p>
  <pre class="lang-ts prettyprint-override"><code>import {Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn} from 'typeorm';
  import {UserPassword} from './user-password.entity';
  
  @Entity()
  export class User {
    @PrimaryGeneratedColumn()
    id: number;
  
    @Column({ length: 35 })
    firstName: string;
  
    @Column({ length: 35 })
    lastName: string;
  
    @Column({ length: 50})
    mail: string;
  
    @OneToOne(type =&gt; UserPassword)
    @JoinColumn()
    password: UserPassword;
  
  }
  </code></pre>
  <p>Then I try to create a user like this:</p>
  <pre class="lang-ts prettyprint-override"><code>// ... some code
  await this.userPasswordRepository.save(userPassword);
  return await this.userRepository.save(user);
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>QueryFailedError: ER_NO_SUCH_TABLE: Table 'typeorm2.user_password' doesn't exist</p>
  </blockquote>
  <p>When I insert the table manually then I get the error:</p>
  <blockquote>
  <p>QueryFailedError: ER_BAD_FIELD_ERROR: Unknown column 'hash' in 'field list'</p>
  </blockquote>
  <p>So it seems like TypeORM doesn't generate the tables / columns. Does anyone know why this could be?</p>