title: Prevent TypeORM from generating constraints
body: <p>I am extending a class Entity to create a <strong>history table</strong>. The history table, must not inherit the unique constraints from the base class because we need to duplicate most of the data in there. Of course, I can just copy the properties without extending the base class but will result in maintaining two classes for each history table.</p>
  <p><em>There is any way, to prevent TypeORM from generating constraints for a class entity?</em></p>
  <p>I am thinking about something similar to <a href="https://typeorm.io/#/relations-faq/avoid-foreign-key-constraint-creation" rel="nofollow noreferrer">avoiding foreign key constraint creation</a>. Maybe a class decorator (something like <code>@IgnoreConstraints</code>) would be nice to have for this type of situations.</p>
  <pre><code>//Base class with required constraint
  @Entity()
  @Unique(['email', 'shopId'])
  export class Customer {}
  
  // Will inherit the unique constraint 
  @Entity()
  export class CustomerHistory extends Customer {}
  </code></pre>
  <p>More, I am using anchan828's very useful <a href="https://github.com/anchan828/typeorm-helpers/tree/master/packages/history#readme" rel="nofollow noreferrer">TypeORM History</a> library which is adding a <code>dropUniqueIndices</code> method to be used in a later migration but unfortunately will later result in auto-generated migrations including those constraints and <code>schema:sync</code> will no longer work.</p>
  <p>Thanks!</p>