Column Types
String types
String column types special features
- Text size validation on submit.
- Text input in form (
MakerMike ConsoleUI). - Allows expand/collapse option only when content overflows (
MakerMike ConsoleUI). - Have Y axis scrolling when content is collapsed (on 5+ rows) (
MakerMike ConsoleUI).
text
You can set the <length> if needed or just use the simpler version, with the simpler version the default length will be 255.
Usage examples
Example 1:
tables:
- name: employee
columns:
- first_name
- last_name
Example 2 with length specified:
tables:
- name: employee
columns:
- first_name
- name: last_name
type: text(255)
longtext
Same as longtext type in MySQL The BLOB and TEXT Types
Usage example
Example:
tables:
- name: employee
columns:
- first_name
- name: last_name
type: longtext
mediumtext
Same as mediumtext type in MySQL The BLOB and TEXT Types
Usage example
Example:
tables:
- name: employee
columns:
- first_name
- name: last_name
type: mediumtext
Numeric types
Numeric column types special features
Input tag type according to each numeric column type in form (MakerMike Console UI).
int
Same as int type as in MySQL Integer Types
Usage example
Example:
tables:
- name: project
columns:
- name
- description
- name: priority
type: int
bigint
Same as bigint type in MySQL Integer Type
Usage example
Example:
tables:
- name: project
columns:
- name
- description
- name: priority
type: bigint
bit
Same as bit type in MySQL Bit-Value Type
Usage example
Example:
tables:
- name: project
columns:
- name
- description
- name: priority
type: bit(64)
decimal or numeric
Usage examples
Same as decimal/numeric type in MySQL DECIMAL Data Type
Usage example
Example 1:
tables:
- name: employee
columns:
- name: salary
type: decimal(5, 2)
Example 2:
tables:
- name: employee
columns:
- name: salary
type: numeric(5, 2)
double
Same as double type in MySQL Floating-Point Types
Usage example
Example:
tables:
- name: employee
columns:
- name: salary
type: double
float
Same as float type in MySQL Floating-Point Types
Usage example
Example:
tables:
- name: department
columns:
- budget
type: float
Date types
These column types are the same as the ones in MySQL The DATE, DATETIME, and TIMESTAMP Types
Date column type special features
Input type according to each date column type in form (MakerMike Console UI).
date
Usage example
Example:
tables:
- name: employee
columns:
- fist_name
- last_name
- name: birthday
type: date
datetime
Usage examples
Example:
tables:
- name: project
columns:
- name
- description
- name: due_date
type: datetime
timestamp
Usage examples
Example:
tables:
- name: employee
columns:
- address
- name: admission
type: timestamp
Special types
code(<LANGUAGE>, <LENGTH>)
Code column type special features
<LANGUAGE>supports the following languages:- css
- html
- javascript
- json
- markdown
- python
- sass
- typescript
- yaml
<LENGTH>possible values:- Integers
- longtext
- mediumtext
- In UI the code is highlighted according to the selected
<LANGUAGE>. - Allows expand/collapse option only when content overflows.
- Has x scrolling by default and y scrolling when content is collapsed and has over 5 lines.
Usage examples
Example 1:
tables:
- name: department
columns:
- name: calculation_free_days
type: code(html, 15000)
Example 2:
tables:
- name: employee
columns:
- name: personal_data
type: code(html, mediumtext)
file
file column type special features
- MakerMike will construct the URLs to your files automatically.
- Can be used with the property following column properties:
- allowed_extensions
- optional
- select
Check more about column properties at Column Properties
Usage examples
Example 1:
tables:
- name: employee
columns:
- name: name
- name: last_name
- name: profile_picture
type: file
Example 2 with optional property:
tables:
- name: employee
columns:
- name: name
- name: last_name
- name: profile_picture
type: file
optional: true
Example 3 with optional and select properties:
tables:
- name: article
columns:
- name: title
- name: article_images
type: file
optional: true
select: multi
Access files You can access your file resources with the following URL structure.
https://<DOMAIN>/makermike/api/uploads/<TABLE_NAME>/<COLUMN_NAME>/<FILE_NAME>
Max file size
Currently Maker mike supports the upload of files up to 10Mb.
JSON column types
Same as the JSON type in MySQL.
JSON type special features
- Allows expand/collapse options in UI.
- Includes actions such as copy JSON and copy YAML in UI
- In form a selector multi/single is used for the columns with this type.
JSON or json
json column type special features In form the field will highlight JSON style.
Usage examples
Example 1:
tables:
- name: employee
columns:
- name: skills
type: json
Example 2:
tables:
- name: employee
columns:
- name: skills
type: JSON
Defined values
You can set a list of defined values, it can be used with the column property select: multi.
Usage example
Example 1:
tables:
- name: employee
columns:
- name: skills
type: type: ["option_1", "option_2", "option_3"]
Example 2:
tables:
- name: employee
columns:
- name: skills
type:
- option_1
- option_2
- option_3
Example 3 with select property:
tables:
- name: employee
columns:
- name: skills
type:
- option_1
- option_2
- option_3
select: multi
Defined values with colors
You can set a list of default values and colors for each value.
json column type special features
- it can be used with the column property select: multi.
- Colors are applied to each value in form and table (
MakerMike ConsoleUI).
Usage examples
Example 1:
tables:
- name: test
type: [{"color": "#FF5733 ", "text": "option 1"}, {"color": "#0EE649 ", "text": "option 2"}]
Example 2:
tables:
- name: test
type:
- color: '#FF5733'
text: option 1
- color: '#0EE649'
text: option 2
Example 3 with select property:
tables:
- name: test
type:
- color: '#FF5733'
text: option 1
- color: '#0EE649'
text: option 2
select: multi
Reference to other table
Reference to other tables special features
- Column property
selectwith valuemultican be used with this column type. - MakerMike creates hyperlinks to the referenced row(s).
- Can reference specific columns.
- If column is not specified MakerMike will use the column set in in the property show
- In the database there is a JSON type.
- The
JSON type columns special featuresapply to this type. - When reading this table with CRUD read it has the following format:
[{"id": <ID>, "display": <REFERENCED_COLUMN_VALUE>}]
Usage examples
Example 1:
tables:
- name: employee
columns:
- fist_name
- last_name
- name: manager
type: employee
Example 2 with specified column:
tables:
- name: employee
columns:
- first_name
- last_name
- name: manager
type: employee.last_name
Example 3 with column property select:
tables:
- name: employee
columns:
- first_name
- last_name
- name: manager
type: employee
select: multi