-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TECH] Mise à jour des dépendances de l'API
Merge pull request #694 from 1024pix/tech-update-api-dependencies
- Loading branch information
Showing
29 changed files
with
5,539 additions
and
5,629 deletions.
There are no files selected for viewing
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20170105153948_update_answers_timeout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'answers'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('timeout'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('timeout'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('timeout'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('timeout'); | ||
}); | ||
}; |
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20170329112753_add_elapsedTime_to_answers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'answers'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('elapsedTime'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('elapsedTime'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('elapsedTime'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('elapsedTime'); | ||
}); | ||
}; |
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20170329153349_update_answers--add_column_result_details.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'answers'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.text('resultDetails'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.text('resultDetails'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('resultDetails'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('resultDetails'); | ||
}); | ||
}; |
28 changes: 11 additions & 17 deletions
28
api/db/migrations/20170418114929_remove_login_from_users.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
const TABLE_NAME = 'users'; | ||
|
||
exports.up = function(knex, Promise) { | ||
|
||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('login'); | ||
table.boolean('cgu'); | ||
table.unique('email'); | ||
}) | ||
]); | ||
|
||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('login'); | ||
table.boolean('cgu'); | ||
table.unique('email'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('login').defaultTo('').notNullable(); | ||
table.dropColumn('cgu'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('login').defaultTo('').notNullable(); | ||
table.dropColumn('cgu'); | ||
}); | ||
}; |
28 changes: 12 additions & 16 deletions
28
api/db/migrations/20170703105035_create_link_between_user_and_assessment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
const TABLE_NAME = 'assessments'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.bigInteger('userId').index().references('users.id'); | ||
table.dropColumn('userName'); | ||
table.dropColumn('userEmail'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.bigInteger('userId').index().references('users.id'); | ||
table.dropColumn('userName'); | ||
table.dropColumn('userEmail'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('userId'); | ||
table.string('userName').notNull(); | ||
table.string('userEmail').notNull(); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('userId'); | ||
table.string('userName').notNull(); | ||
table.string('userEmail').notNull(); | ||
}); | ||
}; |
24 changes: 10 additions & 14 deletions
24
api/db/migrations/20170703163243_update_assessment_with_level_and_score.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
const TABLE_NAME = 'assessments'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('estimatedLevel'); | ||
table.integer('pixScore'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('estimatedLevel'); | ||
table.integer('pixScore'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('estimatedLevel'); | ||
table.dropColumn('pixScore'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('estimatedLevel'); | ||
table.dropColumn('pixScore'); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20171113103608_add_type_to_assessments.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'assessments'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('type'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('type'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('type'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('type'); | ||
}); | ||
}; |
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20171204102525_add_userId_to_certification_course.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'certification-courses'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('userId').references('users.id').index(); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.integer('userId').references('users.id').index(); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('userId'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('userId'); | ||
}); | ||
}; |
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20171212144653_add_status_to_certification_course.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'certification-courses'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('status'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.string('status'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('status'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('status'); | ||
}); | ||
}; |
20 changes: 8 additions & 12 deletions
20
api/db/migrations/20180103152804_add_completed_time_to_certification_course.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const TABLE_NAME = 'certification-courses'; | ||
|
||
exports.up = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dateTime('completedAt'); | ||
}) | ||
]); | ||
exports.up = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dateTime('completedAt'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex, Promise) { | ||
return Promise.all([ | ||
knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('completedAt'); | ||
}) | ||
]); | ||
exports.down = function(knex) { | ||
return knex.schema.table(TABLE_NAME, function(table) { | ||
table.dropColumn('completedAt'); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
api/db/migrations/20180315164634_add-column-access-code-on-sessions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.