2020-10-05 23:59:12 +03:00
|
|
|
const { inherits } = require('util');
|
2019-06-04 00:37:17 +02:00
|
|
|
const ColumnBuilder = require('../../../schema/columnbuilder');
|
2018-02-03 08:33:02 -05:00
|
|
|
|
|
|
|
function ColumnBuilder_Redshift() {
|
|
|
|
ColumnBuilder.apply(this, arguments);
|
|
|
|
}
|
|
|
|
inherits(ColumnBuilder_Redshift, ColumnBuilder);
|
|
|
|
|
|
|
|
// primary needs to set not null on non-preexisting columns, or fail
|
2020-04-19 00:40:23 +02:00
|
|
|
ColumnBuilder_Redshift.prototype.primary = function () {
|
2018-02-03 08:33:02 -05:00
|
|
|
this.notNullable();
|
|
|
|
return ColumnBuilder.prototype.primary.apply(this, arguments);
|
|
|
|
};
|
|
|
|
|
2020-04-19 00:40:23 +02: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
|
|
|
|
2019-06-04 00:37:17 +02:00
|
|
|
module.exports = ColumnBuilder_Redshift;
|