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

  1. 28 Aug, 2013 2 commits
    • ENUM types will no longer in Postgres · fb37f064
      Postgres will now add enum's values on .sync() if you were to add
      entires into the attribute's.value. It'll also add the enum type in
      the proper order. For example:
      
      ```js
      Table = sequelize.define...
        mood: {
          type: DataTypes.ENUM,
          values: ['happy', 'sad']
        }
      
      // For some reason down the road you redefine the same table
      // ...
        mood: {
          type: DataTypes.ENUM,
          values: ['neutral', 'happy', 'sad', 'joyful']
        }
      ```
      
      Will result in the following SQL:
      
      ```sql
      ALTER TYPE "...enumTypeName..." ADD VALUE 'neutral' BEFORE 'happy';
      ALTER TYPE "...enumTypeName..." ADD VALUE 'jouful' AFTER 'sad';
      ```
      
      - ```.drop()``` will now pass the options object through (optional)
      - Added Postgres.QueryGenerator.pgListEnums(tableName=null,
         attrName=null, options) which lists all of the ENUM types for
         Postgres, if you don't specify an attribute and tablename then
         Sequelize will list all of the Enums
      - Added Postgres.QueryGenerator.pgEnumAdd(tableName, attr, value,
         options) which will alter the enum type and add values
      - Added Postgres.QueryGenerator.pgEnumDrop(tableName, attr) which
         will drop the enum type
      - Postgres.QueryGenerator.pgEnum() will no longer try to drop the
         type unless {force: true} within the ```.sync()``` commands
      - Refactored ```QueryInterface.createTable()``` in order to allow
         Postgres to create enum types explicitly rather than from
         Postgres.```QueryGenerator.createTable()```
      - Refactored QueryInterface.dropTable() -- same as ```createTable()```
         changes .. also {force: true/force} will now set options.cascade
      - QueryInterface.dropAllTables() will now correctly add a quote
         identifier to table names for MySQL
      
      Closes https://github.com/sequelize/sequelize/issues/546
      Daniel Durante committed
  2. 27 Aug, 2013 6 commits
  3. 25 Aug, 2013 2 commits
    • Enum values can now be null · 202aeedd
      If the column allows null values, the validation for that column will be skipped
      if the vale is null.
      
      Closes https://github.com/sequelize/sequelize/issues/839
      Daniel Durante committed
    • Allows us to define our own timestamp columns. · 6ef1f5eb
      This commit allows the user to predefine their own timestamp columns which is
      useful for databases that already exist. This also allows the user to have their
      own naming conventions for the timestamp columns.
      
      The following options have been added when defining a new table:
      
      * createdAt (defaults to "createdAt")
      * updatedAt (defaults to "updatedAt")
      * deletedAt (defaults to "deletedAt")
      * touchedAt (defaults to "touchedAt")
      
      Note: The underscored option still remains useful since it's just a simple one
      line option which allows flexibility for those rare cases in which people decide
      to change the structure of their database from camelCase to under_score or
      vice-versa.
      Daniel Durante committed
  4. 24 Aug, 2013 3 commits
  5. 23 Aug, 2013 11 commits
  6. 22 Aug, 2013 11 commits
  7. 21 Aug, 2013 5 commits