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

Commit 1e208eeb by Jan Aagaard Meier

Create uuid extension if not exists

1 parent 349a1f78
Showing with 2 additions and 0 deletions
...@@ -349,6 +349,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -349,6 +349,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
, userWithDefaults , userWithDefaults
if (dialect.indexOf('postgres') === 0) { if (dialect.indexOf('postgres') === 0) {
this.sequelize.query('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"').success(function() {
userWithDefaults = self.sequelize.define('userWithDefaults', { userWithDefaults = self.sequelize.define('userWithDefaults', {
uuid: { uuid: {
type: 'UUID', type: 'UUID',
...@@ -363,6 +364,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -363,6 +364,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
done() done()
}) })
}) })
})
} else if (dialect === 'sqlite') { } else if (dialect === 'sqlite') {
// The definition here is a bit hacky. sqlite expects () around the expression for default values, so we call a function without a name // The definition here is a bit hacky. sqlite expects () around the expression for default values, so we call a function without a name
// to enclose the date function in (). http://www.sqlite.org/syntaxdiagrams.html#column-constraint // to enclose the date function in (). http://www.sqlite.org/syntaxdiagrams.html#column-constraint
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!