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; break;
case 'integer': case 'integer':
case 'biginteger': case 'biginteger':
type = definition.client === 'pg' ? 'integer' : 'int'; type = definition.client === 'pg' ? 'bigint' : 'bigint';
break; break;
case 'float': case 'float':
type = definition.client === 'pg' ? 'double precision' : 'double'; type = definition.client === 'pg' ? 'double precision' : 'double';

View File

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

View File

@ -259,6 +259,7 @@
"value": "integer", "value": "integer",
"items": [ "items": [
{ "name": "content-type-builder.form.attribute.item.number.type.integer", "value": "integer" }, { "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.float", "value": "float" },
{ "name": "content-type-builder.form.attribute.item.number.type.decimal", "value": "decimal" } { "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 // Array of attributes that the ctb can handle at the moment
const availableAttributes = Object.keys(forms.attribute); 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 jsx-a11y/no-static-element-interactions */
/* eslint-disable react/jsx-wrap-multilines */ /* 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) { switch (attribute.params.type) {
case 'integer': case 'integer':
case 'biginteger':
case 'float': case 'float':
case 'decimal': case 'decimal':
attributeType = 'number'; attributeType = 'number';

View File

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

View File

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