From d6dc4d2deeb8b229a7b512a8d0240e226ce03ffa Mon Sep 17 00:00:00 2001 From: Ben Drucker Date: Fri, 13 Feb 2015 15:00:32 -0500 Subject: [PATCH] Don't warn for SQLite with create if not exists Closes #689 --- lib/dialects/sqlite3/schema/table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dialects/sqlite3/schema/table.js b/lib/dialects/sqlite3/schema/table.js index c55f262bf..334b0a6ba 100644 --- a/lib/dialects/sqlite3/schema/table.js +++ b/lib/dialects/sqlite3/schema/table.js @@ -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; -}; \ No newline at end of file +};