mirror of
https://github.com/directus/directus.git
synced 2026-02-11 04:45:34 -05:00
Fix data type inconsistencies in directus_shares table (#10740)
* Fix date resolution in share info endpoint * Add note on leaving fields blank * Tweak example to use proper db client * Treat mysql 0000-00-00 00:00:00 as null * Fix migration for mysql 5 * Add missing defaults to system fields
This commit is contained in:
@@ -10,8 +10,11 @@ export async function up(knex: Knex): Promise<void> {
|
||||
table.string('password');
|
||||
table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL');
|
||||
table.timestamp('date_created').defaultTo(knex.fn.now());
|
||||
table.timestamp('date_start');
|
||||
table.timestamp('date_end');
|
||||
|
||||
// This was changed after the migration went live to retroactively fix mysql5, see #10693
|
||||
table.timestamp('date_start').nullable().defaultTo(null);
|
||||
table.timestamp('date_end').nullable().defaultTo(null);
|
||||
|
||||
table.integer('times_used').defaultTo(0);
|
||||
table.integer('max_uses');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user