Example schema
var tableBuilder = new lf.schema.TableBuilder('Table');
tableBuilder.
addColumn('employeeId', lf.Type.INTEGER).
addUnique('uq_employeeId', ['employeeId']).
addForeignKey('fkemployeeId', {
local: 'employeeId',
ref: 'Employee.id'
});
var schema = tableBuilder.getSchema();
This schema will cause 2 indices to be generated for the same column, fkemployeeid and uq_employeeId. This seems wasteful and also inconsistent with what other SQL engines do. We can probably find a way to only generate one index instead.
Example schema var tableBuilder = new lf.schema.TableBuilder('Table'); tableBuilder. addColumn('employeeId', lf.Type.INTEGER). addUnique('uq_employeeId', ['employeeId']). addForeignKey('fkemployeeId', { local: 'employeeId', ref: 'Employee.id' }); var schema = tableBuilder.getSchema();
This schema will cause 2 indices to be generated for the same column, fkemployeeid and uq_employeeId. This seems wasteful and also inconsistent with what other SQL engines do. We can probably find a way to only generate one index instead.