2018-02-03 08:33:02 -05:00
|
|
|
import inherits from 'inherits';
|
|
|
|
import ColumnBuilder from '../../../schema/columnbuilder';
|
|
|
|
|
|
|
|
function ColumnBuilder_Redshift() {
|
|
|
|
ColumnBuilder.apply(this, arguments);
|
|
|
|
}
|
|
|
|
inherits(ColumnBuilder_Redshift, ColumnBuilder);
|
|
|
|
|
|
|
|
// primary needs to set not null on non-preexisting columns, or fail
|
2018-07-09 08:10:34 -04:00
|
|
|
ColumnBuilder_Redshift.prototype.primary = function() {
|
2018-02-03 08:33:02 -05:00
|
|
|
this.notNullable();
|
|
|
|
return ColumnBuilder.prototype.primary.apply(this, arguments);
|
|
|
|
};
|
|
|
|
|
2018-07-09 08:10:34 -04:00
|
|
|
ColumnBuilder_Redshift.prototype.index = function() {
|
2018-05-29 17:42:03 +02:00
|
|
|
this.client.logger.warn('Redshift does not support the creation of indexes.');
|
2018-02-03 08:33:02 -05:00
|
|
|
return this;
|
2018-07-09 08:10:34 -04:00
|
|
|
};
|
2018-02-03 08:33:02 -05:00
|
|
|
|
|
|
|
export default ColumnBuilder_Redshift;
|