diff --git a/src/adonisjs/database/migrations/1642523350279_cases_update_character_set_schema.js b/src/adonisjs/database/migrations/1642523350279_cases_update_character_set_schema.js new file mode 100644 index 0000000..a9313c4 --- /dev/null +++ b/src/adonisjs/database/migrations/1642523350279_cases_update_character_set_schema.js @@ -0,0 +1,30 @@ +'use strict' + +/** @type {import('@adonisjs/lucid/src/Schema')} */ +const Schema = use('Schema') + +class CasesUpdateCharacterSetSchema extends Schema { + up () { + this.table('cases', (table) => { + table.string('title').notNullable().collate('utf8mb4_unicode_ci').alter() + table.string('description').collate('utf8mb4_unicode_ci').alter() + table.string('domain', 50).collate('utf8mb4_unicode_ci').alter() + table.string('specialty', 50).collate('utf8mb4_unicode_ci').alter() + table.string('keywords', 512).collate('utf8mb4_unicode_ci').alter() + table.text('source').collate('utf8mb4_unicode_ci') + }) + } + + down () { + this.table('cases', (table) => { + table.string('title').notNullable().alter() + table.string('description').alter() + table.string('domain', 50).alter() + table.string('specialty', 50).alter() + table.string('keywords', 512).alter() + table.dropColumn('source') + }) + } +} + +module.exports = CasesUpdateCharacterSetSchema diff --git a/src/adonisjs/database/migrations/1642531634930_case_versions_update_character_set_schema.js b/src/adonisjs/database/migrations/1642531634930_case_versions_update_character_set_schema.js new file mode 100644 index 0000000..371b888 --- /dev/null +++ b/src/adonisjs/database/migrations/1642531634930_case_versions_update_character_set_schema.js @@ -0,0 +1,20 @@ +'use strict' + +/** @type {import('@adonisjs/lucid/src/Schema')} */ +const Schema = use('Schema') + +class CaseVersionsUpdateCharacterSetSchema extends Schema { + up () { + this.table('case_versions', (table) => { + table.text('source').collate('utf8mb4_unicode_ci').alter() + }) + } + + down () { + this.table('case_versions', (table) => { + table.text('source').alter() + }) + } +} + +module.exports = CaseVersionsUpdateCharacterSetSchema