Set User table name and fix test for migrations

This commit is contained in:
Anatoliy Chakkaev 2013-02-16 23:09:20 +08:00
parent b15aa88681
commit ec6d6e7572
1 changed files with 7 additions and 6 deletions

View File

@ -24,6 +24,7 @@ User = schema.define 'User',
, indexes:
index1:
columns: 'email, createdByAdmin'
table: 'user'
withBlankDatabase = (cb) ->
db = schema.settings.database = DBNAME
@ -119,8 +120,8 @@ it 'should run migration', (test) ->
# Once gain, getIdexes truncates multi-key indexes to the first member. Hence index1 is correct.
getIndexes 'User', (err, fields) ->
test.deepEqual fields,
PRIMARY:
Table: 'User'
PRIMARY:
Table: 'user'
Non_unique: 0
Key_name: 'PRIMARY'
Seq_in_index: 1
@ -133,8 +134,8 @@ it 'should run migration', (test) ->
Index_type: 'BTREE'
Comment: ''
Index_comment: ''
email:
Table: 'User'
email:
Table: 'user'
Non_unique: 1
Key_name: 'email'
Seq_in_index: 1
@ -147,8 +148,8 @@ it 'should run migration', (test) ->
Index_type: 'BTREE'
Comment: ''
Index_comment: ''
index1:
Table: 'User'
index1:
Table: 'user'
Non_unique: 1
Key_name: 'index1'
Seq_in_index: 1