code: function ddl(table, attributes) {
      var
          sql = 'create table `' + table + '` (\n',
          pk = null,
          uniques = [],
          indics = [];
      _.each(attributes, function (attr, name) {
          var col = '  `' + name + '` ' + (attr.type || 'varchar(255)');
          col = col + (attr.allowNull ? ' null' : ' not null');
          if (attr.primaryKey) {
              pk = name;
              if (attr.autoIncrement) {
                  col = col + ' auto_increment';
              }
          } else {
              if (attr.unique) {
                  uniques.push(name);
              }
              if (attr.index && !attr.unique) {
                  indics.push(name);
              }
          }
          col = col + ',\n';
          sql = sql + col;
      });
      _.each(indics, function (idx) {
          sql = sql + '  key `idx_' + idx + '` (`' + idx + '`),\n';
      });
      _.each(uniques, function (idx) {
          sql = sql + '  unique key `idx_' + idx + '` (`' + idx + '`),\n';
      });
      sql = sql + '  primary key (`' + pk + '`)\n';
      sql = sql + ') engine=innodb default charset=utf8;\n';
      return sql;
  }
docs: generate DDL: