不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit d4e2ee20 by Michael Robinson

Updated dao.test.js, query-generator.test.js to expect the public schema

1 parent 52cb7ce7
...@@ -390,15 +390,15 @@ if (dialect.match(/^postgres/)) { ...@@ -390,15 +390,15 @@ if (dialect.match(/^postgres/)) {
return User.sync({ return User.sync({
logging: function (sql) { logging: function (sql) {
if (sql.indexOf('neutral') > -1) { if (sql.indexOf('neutral') > -1) {
expect(sql.indexOf("ALTER TYPE \"enum_UserEnums_mood\" ADD VALUE 'neutral' BEFORE 'happy'")).to.not.be.equal(-1); expect(sql.indexOf("ALTER TYPE \"public\".\"enum_UserEnums_mood\" ADD VALUE 'neutral' BEFORE 'happy'")).to.not.be.equal(-1);
count++; count++;
} }
else if (sql.indexOf('ecstatic') > -1) { else if (sql.indexOf('ecstatic') > -1) {
expect(sql.indexOf("ALTER TYPE \"enum_UserEnums_mood\" ADD VALUE 'ecstatic' BEFORE 'meh'")).to.not.be.equal(-1); expect(sql.indexOf("ALTER TYPE \"public\".\"enum_UserEnums_mood\" ADD VALUE 'ecstatic' BEFORE 'meh'")).to.not.be.equal(-1);
count++; count++;
} }
else if (sql.indexOf('joyful') > -1) { else if (sql.indexOf('joyful') > -1) {
expect(sql.indexOf("ALTER TYPE \"enum_UserEnums_mood\" ADD VALUE 'joyful' AFTER 'meh'")).to.not.be.equal(-1); expect(sql.indexOf("ALTER TYPE \"public\".\"enum_UserEnums_mood\" ADD VALUE 'joyful' AFTER 'meh'")).to.not.be.equal(-1);
count++; count++;
} }
} }
......
...@@ -181,7 +181,7 @@ if (dialect.match(/^postgres/)) { ...@@ -181,7 +181,7 @@ if (dialect.match(/^postgres/)) {
}, },
{ {
arguments: ['myTable', {title: 'ENUM("A", "B", "C")', name: 'VARCHAR(255)'}], arguments: ['myTable', {title: 'ENUM("A", "B", "C")', name: 'VARCHAR(255)'}],
expectation: 'CREATE TABLE IF NOT EXISTS \"myTable\" (\"title\" \"enum_myTable_title\", \"name\" VARCHAR(255));' expectation: 'CREATE TABLE IF NOT EXISTS \"myTable\" (\"title\" \"public\".\"enum_myTable_title\", \"name\" VARCHAR(255));'
}, },
{ {
arguments: ['myTable', {title: 'VARCHAR(255)', name: 'VARCHAR(255)', id: 'INTEGER PRIMARY KEY'}], arguments: ['myTable', {title: 'VARCHAR(255)', name: 'VARCHAR(255)', id: 'INTEGER PRIMARY KEY'}],
...@@ -205,7 +205,7 @@ if (dialect.match(/^postgres/)) { ...@@ -205,7 +205,7 @@ if (dialect.match(/^postgres/)) {
}, },
{ {
arguments: ['myTable', {title: 'ENUM("A", "B", "C")', name: 'VARCHAR(255)'}], arguments: ['myTable', {title: 'ENUM("A", "B", "C")', name: 'VARCHAR(255)'}],
expectation: 'CREATE TABLE IF NOT EXISTS myTable (title "enum_myTable_title", name VARCHAR(255));', expectation: 'CREATE TABLE IF NOT EXISTS myTable (title public."enum_myTable_title", name VARCHAR(255));',
context: {options: {quoteIdentifiers: false}} context: {options: {quoteIdentifiers: false}}
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!