mirror of
https://github.com/strapi/strapi.git
synced 2025-10-17 11:08:14 +00:00
Use double type for more precision
This commit is contained in:
parent
76caaba714
commit
e57a40b328
@ -56,8 +56,8 @@ const toStrapiType = column => {
|
||||
case 'decimal': {
|
||||
return { type: 'decimal', args: [10, 2] };
|
||||
}
|
||||
case 'float': {
|
||||
return { type: 'float', args: [10, 2] };
|
||||
case 'double': {
|
||||
return { type: 'double' };
|
||||
}
|
||||
case 'bigint': {
|
||||
return { type: 'bigInteger' };
|
||||
@ -90,7 +90,6 @@ const toStrapiType = column => {
|
||||
case 'timestamp': {
|
||||
return { type: 'timestamp', args: [{ useTz: false, precision: 6 }] };
|
||||
}
|
||||
|
||||
case 'json': {
|
||||
return { type: 'jsonb' };
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ const toStrapiType = column => {
|
||||
}
|
||||
case 'real':
|
||||
case 'double': {
|
||||
return { type: 'float', args: [10, 2] };
|
||||
return { type: 'double' };
|
||||
}
|
||||
case 'bigint': {
|
||||
return { type: 'bigInteger' };
|
||||
|
@ -39,6 +39,7 @@ class SqliteDialect extends Dialect {
|
||||
case 'enum': {
|
||||
return 'text';
|
||||
}
|
||||
case 'double':
|
||||
case 'decimal': {
|
||||
return 'float';
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ const getColumnType = attribute => {
|
||||
return { type: 'bigInteger' };
|
||||
}
|
||||
case 'float': {
|
||||
return { type: 'float', args: [10, 2] };
|
||||
return { type: 'double' };
|
||||
}
|
||||
case 'decimal': {
|
||||
return { type: 'decimal', args: [10, 2] };
|
||||
|
Loading…
x
Reference in New Issue
Block a user