Don't warn for SQLite with create if not exists

Closes #689
This commit is contained in:
Ben Drucker 2015-02-13 15:00:32 -05:00
parent 01f5ce4972
commit d6dc4d2dee

View File

@ -80,7 +80,7 @@ TableCompiler_SQLite3.prototype.index = function(columns, indexName) {
TableCompiler_SQLite3.prototype.primary =
TableCompiler_SQLite3.prototype.foreign = function() {
if (this.method !== 'create') {
if (this.method !== 'create' && this.method !== 'createIfNot') {
console.warn('SQLite3 Foreign & Primary keys may only be added on create');
}
};
@ -136,4 +136,4 @@ TableCompiler_SQLite3.prototype.dropColumn = function(column) {
client.TableBuilder = TableBuilder_SQLite3;
client.TableCompiler = TableCompiler_SQLite3;
};
};