title: TypeORM conditional nullable?
body: <p>I am developing a log in system in NestJS using TypeORM and Postgres.
  In my login options, I propose the user to use a couple email / password or to use an OAuth authentication. But once an account is created, they are not mutually exclusive (a user can have an email + password and a Google account attached to his account, for example).</p>
  <p>Therefore, I would like to make the password OR the OAuthLogin nullable, but at least one of them should never be nullable.</p>
  <p>Is it possible to achieve this with TypeORM ?</p>
  <pre class="lang-js prettyprint-override"><code>@Entity()
  class User {
      @PrimaryGeneratedColumn()
      public id: number;
  
      @Column({ unique: true })
      public email: string;
  
      @Column({ nullable: true })
      @Exclude()
      public password?: string;
  
      @JoinColumn()
      @OneToMany(() =&gt; OAuthLogin, (provider: OAuthLogin) =&gt; provider.user, {
          cascade: true,
      })
      public oAuthLogins: OAuthLogin[];
  }
  
  export default User;
  </code></pre>
  <p>(P. S.: for my current code, I chose to make the password only nullable...)</p>