Add bigint

This commit is contained in:
DMehaffy 2019-01-21 04:35:11 -07:00
parent 80d13dff9c
commit f2870bc8fc
6 changed files with 7 additions and 2 deletions

View File

@ -421,7 +421,7 @@ module.exports = function(strapi) {
break;
case 'integer':
case 'biginteger':
type = definition.client === 'pg' ? 'integer' : 'int';
type = definition.client === 'pg' ? 'bigint' : 'bigint';
break;
case 'float':
type = definition.client === 'pg' ? 'double precision' : 'double';

View File

@ -42,6 +42,7 @@ class AttributeRow extends React.Component {
string: IcoString,
text: IcoText,
integer: IcoNumber,
biginteger: IcoNumber,
float: IcoNumber,
decimal: IcoNumber,
email: IcoEmail,

View File

@ -259,6 +259,7 @@
"value": "integer",
"items": [
{ "name": "content-type-builder.form.attribute.item.number.type.integer", "value": "integer" },
{ "name": "content-type-builder.form.attribute.item.number.type.biginteger", "value": "big integer" },
{ "name": "content-type-builder.form.attribute.item.number.type.float", "value": "float" },
{ "name": "content-type-builder.form.attribute.item.number.type.decimal", "value": "decimal" }
],

View File

@ -41,7 +41,7 @@ import styles from './styles.scss';
// Array of attributes that the ctb can handle at the moment
const availableAttributes = Object.keys(forms.attribute);
availableAttributes.push('integer', 'decimal', 'float');
availableAttributes.push('integer', 'biginteger', 'decimal', 'float');
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable react/jsx-wrap-multilines */
@ -164,6 +164,7 @@ export class ModelPage extends React.Component { // eslint-disable-line react/pr
switch (attribute.params.type) {
case 'integer':
case 'biginteger':
case 'float':
case 'decimal':
attributeType = 'number';

View File

@ -7,6 +7,7 @@
"attribute.enumeration": "Enumeration",
"attribute.float": "Float",
"attribute.integer": "integer",
"attribute.biginteger": "big integer",
"attribute.json": "JSON",
"attribute.media": "Media",
"attribute.password": "Password",

View File

@ -92,6 +92,7 @@ class Manager {
case 'decimal':
case 'float':
case 'integer':
case 'biginteger':
case 'number':
return 4;
case 'json':