mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Patch Tuesday 🐸 (#17530)
* Update root deps * Reformat files with new prettier version * Update `directus` deps * Update `@directus/app` deps * Update `@directus/shared` deps * Update components snapshots after updates prop order has changed * Update `extensions-sdk` deps * pin version of zod in shared * Update `@directus/storage` deps * Update `@directus/storage-driver-azure` deps * Update `storage-driver-cloudinary` deps * Update `@directus/storage-driver-cloudinary` deps * Update `@directus/storage-driver-local` deps * Update `@directus/storage-driver-s3` deps * Update `@directus/utils` deps --------- Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -5,7 +5,7 @@ export class SchemaHelperCockroachDb extends SchemaHelper {
|
||||
async changeToType(
|
||||
table: string,
|
||||
column: string,
|
||||
type: typeof KNEX_TYPES[number],
|
||||
type: (typeof KNEX_TYPES)[number],
|
||||
options: Options = {}
|
||||
): Promise<void> {
|
||||
await this.changeToTypeByCopy(table, column, type, options);
|
||||
|
||||
@@ -6,7 +6,7 @@ export class SchemaHelperOracle extends SchemaHelper {
|
||||
async changeToType(
|
||||
table: string,
|
||||
column: string,
|
||||
type: typeof KNEX_TYPES[number],
|
||||
type: (typeof KNEX_TYPES)[number],
|
||||
options: Options = {}
|
||||
): Promise<void> {
|
||||
await this.changeToTypeByCopy(table, column, type, options);
|
||||
|
||||
@@ -25,7 +25,7 @@ export abstract class SchemaHelper extends DatabaseHelper {
|
||||
async changeToType(
|
||||
table: string,
|
||||
column: string,
|
||||
type: typeof KNEX_TYPES[number],
|
||||
type: (typeof KNEX_TYPES)[number],
|
||||
options: Options = {}
|
||||
): Promise<void> {
|
||||
await this.knex.schema.alterTable(table, (builder) => {
|
||||
@@ -50,7 +50,7 @@ export abstract class SchemaHelper extends DatabaseHelper {
|
||||
protected async changeToTypeByCopy(
|
||||
table: string,
|
||||
column: string,
|
||||
type: typeof KNEX_TYPES[number],
|
||||
type: (typeof KNEX_TYPES)[number],
|
||||
options: Options
|
||||
): Promise<void> {
|
||||
const tempName = `${column}__temp`;
|
||||
|
||||
@@ -670,8 +670,8 @@ export class FieldsService {
|
||||
column = table.timestamp(field.field, { useTz: true });
|
||||
} else if (field.type.startsWith('geometry')) {
|
||||
column = this.helpers.st.createColumn(table, field);
|
||||
} else if (KNEX_TYPES.includes(field.type as typeof KNEX_TYPES[number])) {
|
||||
column = table[field.type as typeof KNEX_TYPES[number]](field.field);
|
||||
} else if (KNEX_TYPES.includes(field.type as (typeof KNEX_TYPES)[number])) {
|
||||
column = table[field.type as (typeof KNEX_TYPES)[number]](field.field);
|
||||
} else {
|
||||
throw new InvalidPayloadException(`Illegal type passed: "${field.type}"`);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export const TransformationMethods /*: readonly (keyof Sharp)[]*/ = [
|
||||
] as const;
|
||||
|
||||
// Helper types
|
||||
type AllowedSharpMethods = Pick<Sharp, typeof TransformationMethods[number]>;
|
||||
type AllowedSharpMethods = Pick<Sharp, (typeof TransformationMethods)[number]>;
|
||||
|
||||
export type TransformationMap = {
|
||||
[M in keyof AllowedSharpMethods]: readonly [M, ...Parameters<AllowedSharpMethods[M]>];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type Driver = 'mysql' | 'pg' | 'cockroachdb' | 'sqlite3' | 'oracledb' | 'mssql';
|
||||
|
||||
export const DatabaseClients = ['mysql', 'postgres', 'cockroachdb', 'sqlite', 'oracle', 'mssql', 'redshift'] as const;
|
||||
export type DatabaseClient = typeof DatabaseClients[number];
|
||||
export type DatabaseClient = (typeof DatabaseClients)[number];
|
||||
|
||||
Reference in New Issue
Block a user