mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Change the underlying data store db column types to support decimal numbers (#18549)
This commit is contained in:
@@ -9,7 +9,8 @@ export class Column {
|
||||
| 'json'
|
||||
| 'timestamptz'
|
||||
| 'timestamp'
|
||||
| 'uuid';
|
||||
| 'uuid'
|
||||
| 'double';
|
||||
|
||||
private isGenerated = false;
|
||||
|
||||
@@ -39,6 +40,11 @@ export class Column {
|
||||
return this;
|
||||
}
|
||||
|
||||
get double() {
|
||||
this.type = 'double';
|
||||
return this;
|
||||
}
|
||||
|
||||
varchar(length?: number) {
|
||||
this.type = 'varchar';
|
||||
this.length = length ?? 'auto';
|
||||
@@ -162,6 +168,14 @@ export class Column {
|
||||
if (isMysql) options.type = 'varchar(36)';
|
||||
// we haven't been defining length on "uuid" varchar on sqlite
|
||||
if (isSqlite) options.type = 'varchar';
|
||||
} else if (type === 'double') {
|
||||
if (isPostgres) {
|
||||
options.type = 'double precision';
|
||||
} else if (isMysql) {
|
||||
options.type = 'double';
|
||||
} else if (isSqlite) {
|
||||
options.type = 'real';
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user