Migrations
Migrations allow you to create a new version of your back office by defining the composition and relationships between your different entities. It's migrations that allow you to develop the application that will fit your business needs.
Composition
A migration is composed of a version, a state, a progress, an author, and a set of data set up via the editor.
The version of your migration corresponds to the version of the application that will be deployed.
ℹ️
Each new version of the application comes with the creation of a new version of your application's documentation.
Each migration is done as a background task. You can track their progress thanks to progress.
The author is, as the name suggests, the author of the migration.
The state is the current status of your migration. Possible states are:
- Edit mode
- Pending
- Scheduled
- In progress
- Finished
- Rollbacking
- Generating
- Error
- No solution
It is possible to go back and reverse the last migration you made. If there is an error, please contact support.
ℹ️
To avoid data loss regarding ongoing actions, you can schedule your migration using the Schedule button. The latter will then be executed at 2 a.m.
Representation
In order to better understand the impact of your migration, several representation tools are available when you visualize a migration:
Diagram
The diagram graphically represents your entire application, highlighting the composition and relationships between different entities and workflows.
Specifications
The specifications describe all the specifications of your application, but in a textual way.
Changes
The changes indicate the concrete actions that will impact your database. For example, creating a new entity creates a new table in your database.
Generation by artificial intelligence
It is possible to generate a migration and therefore your back office via artificial intelligence. To do this, click on the button AI Application Generator to access the form to fill out an application description.
In this field, describe the entities in your app as precisely as possible. When you're ready, click Confirm. Your migration will then begin building in the background, and when your migration is complete, you can access and edit your migration as needed using the Advanced Editor.
ℹ️
If no migration could be generated by AI, it will take the state of No Solution. You can then try to generate a migration again by editing the application description.
Advanced Editor
Entities
Click the Add a new entity button to get started. An entity consists of a name and a set of options.
⚠️
The name of the entity should preferably be in English, without spaces and in the singular. Spaces will be automatically replaced with underscores _
and accents will be removed.
Click the icon to access the entity's options.
Option | Expected value | Description |
---|---|---|
Descriptor | Dropdown | Most representative field of your entity |
Actions | Multiple choice | Add , Archive , Read , Edit , List , Delete |
Icon | Dropdown | Entity icon |
Attributes
Click the button to select an attribute type to add among the forty available. An attribute consists of a name, a type, and a set of options.
⚠️
The name of the attribute should preferably be in English and without spaces. Spaces will be automatically replaced with underscores _
and accents will be removed.
ℹ️
An attribute can change its type only to a compatible type. For example, text can become a string, but not an integer.
Click the icon to access the attribute options. The options differ depending on the type of attribute you choose.
Boolean
A boolean attribute is a variable that can only take two values: True
or False
.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Acceptance | Boolean | Must be accepted field |
Default value | Boolean | True or False |
String
A string attribute is a text segment that can be represented on a single line.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Translated | Boolean | Enable field translations |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Formatting | Dropdown | Uppercase , Lowercase or Capitalize |
Default value | Text | Field default value |
Date
A date attribute is used to represent the day, month, and year.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Start date | Boolean | Start of calendar date |
End date | Boolean | End of calendar date |
Greater than or equal to | Dropdown | Field value must be greater than or equal to |
Equal to | Dropdown | Field value must be equal to |
Less than | Dropdown | Field value must be less than |
Less than or equal to | Dropdown | Field value must be less than or equal to |
Other than | Dropdown | Field value must be different from |
Greater than | Dropdown | Field value must be greater than |
Default value | Date | Field default value |
Document
A document attribute is a single file attached to your entity.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Size | Number | Maximum document size in megabytes |
Width | Number | Maximum document width in pixels |
Height | Number | Maximum document height in pixels |
Aspect ratio | Dropdown | 16/9 , 4/3 , Square or Landscape |
Content type | Multiple choice | gif , jpeg , mp3 , pdf , txt ... |
Secret
A secret attribute is used to hide a secret key.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Text | Field default value |
Formatting | Dropdown | Uppercase , Lowercase or Capitalize |
State machine
A state machine attribute is used to model a workflow.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Default value | Dropdown | Field default value |
Values | Multiple choice | Possible values for enumeration |
Events | - | See table below |
An event is used to move from state A to state B. States are set via the values field.
Option | Expected value | Description |
---|---|---|
Request confirmation | Boolean | Request confirmation before triggering the event |
Name | Text | Event name |
Icon | Dropdown | Event icon |
Color | Dropdown | Color of the badge / button associated with the event |
From | Multiple choice | Event transition starting value(s) |
To | Dropdown | Event transition end value |
Function | Text | Function called after the event |
Integer
An integer attribute is a number that does not have a decimal point digit.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Auto increment | Boolean | Automatic increment of the field value |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Unit | Text | Unit of number: $ , € , £ , ¥ , % , bytes , ... |
Text
A text attribute is a set of characters that can be represented on multiple lines.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Translated | Boolean | Enable field translations |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Formatting | Dropdown | Uppercase , Lowercase or Capitalize |
Default value | Text | Field default value |
Address
An address attribute is a string used to represent a mailing address.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Formatting | Dropdown | Uppercase , Lowercase or Capitalize |
Default value | Text | Field default value |
IP address
An IP address attribute is a string used to represent an IP address. For example, 192.168.0.1
is a valid IP address.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
User agent
A user agent attribute is a string that presents information about the browser. For example, Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
is a valid user agent.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Response code
A response code attribute is an integer used to represent a response code for an HTTP request. For example, 200
, 401
, 404
are valid response codes.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Color
A color attribute is a string used to represent a hexadecimal color code. For example, #000000
is a valid color code.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Datetime
A datetime attribute is used to represent the day, month, year, as well as hours and minutes.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Start date | Boolean | Start of calendar date |
End date | Boolean | End of calendar date |
Greater than or equal to | Dropdown | Field value must be greater than or equal to |
Equal to | Dropdown | Field value must be equal to |
Less than | Dropdown | Field value must be less than |
Less than or equal to | Dropdown | Field value must be less than or equal to |
Other than | Dropdown | Field value must be different from |
Greater than | Dropdown | Field value must be greater than |
Default value | Datetime | Field default value |
Currency
A currency attribute is a float used to represent a currency. For example, dollars or euros.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Unit | Text | Currency unit: $ , € , £ , ¥ , ... |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
Documents
A documents attribute is a set of files attached to your entity.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Size | Number | Maximum document size in megabytes |
Width | Number | Maximum document width in pixels |
Height | Number | Maximum document height in pixels |
Minimum | Number | Minimum number of documents allowed |
Maximum | Number | Maximum number of documents allowed |
Aspect ratio | Dropdown | 16/9 , 4/3 , Square or Landscape |
Content type | Multiple choice | gif , jpeg , mp3 , pdf , txt ... |
Duration
A duration attribute is an integer used to represent a duration. For example, seconds or milliseconds.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Unit | Text | Unit of duration: ms , s , m , h , ... |
Email
An email attribute is case-insensitive string that can be used to represent an email address.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Code editor
A code editor attribute is a text used to represent a portion of code. In edit mode, a code editor based on VS Code will be offered.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Translated | Boolean | Enable field translations |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Language | Dropdown | c , css , java , javascript , php , python ... |
Rich text editor
A rich text editor attribute is used to present formatted text. In edit mode, a rich text editor based on Trix will be offered.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Translated | Boolean | Enable field translations |
Enumeration
An enumeration attribute allows you to choose a single data from a set of values.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Dropdown | Field default value |
Values | Multiple choice | Possible values for enumeration |
Flag
A flag attribute allows you to choose one or more pieces of data from a set of values.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Multiple choice | Field default value(s) |
Values | Multiple choice | Possible values for enumeration |
Time zone
A time zone attribute is a string used to represent a time zone. For example, (GMT+01:00) Paris
is a valid time zone.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Dropdown | Field default value |
Time
An hour attribute is used to represent hours and minutes.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Dropdown | Field value must be greater than or equal to |
Equal to | Dropdown | Field value must be equal to |
Less than | Dropdown | Field value must be less than |
Less than or equal to | Dropdown | Field value must be less than or equal to |
Other than | Dropdown | Field value must be different from |
Greater than | Dropdown | Field value must be greater than |
Default value | Time | Field default value |
JSON
A JSON attribute is used to represent data in JSON format. For example, { foo: true }
is a valid JSON.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Text | In JSON format { foo: true } |
Token
A token attribute represents a one-time token. This token can be used in authentication systems, for example.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Password
A password attribute is used to represent a password.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Confirmation | Boolean | Add a password confirmation field |
Minimum | Number | Minimum password length |
Default value | Text | Field default value |
One-time password
A one-time password attribute is used to generate a single sign-on code, which can be used in a two-factor authentication system, for example.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Decimal
A decimal attribute is a number that has digits after the decimal point. The decimal variant allows you to work with larger numbers than the float variant. It also allows you to specify the number of digits before the decimal point.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Auto increment | Boolean | Automatic increment of the field value |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Unit | Text | Unit of number: $ , € , £ , ¥ , % , bytes , ... |
Precision | Number | Number of digits after decimal point |
Scale | Number | Number of digits before decimal point |
Separator | Dropdown | , or . |
Float
A float attribute is a number that has digits after the decimal point.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Auto increment | Boolean | Automatic increment of the field value |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Unit | Text | Unit of number: $ , € , £ , ¥ , % , bytes , ... |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
Rating
A rating attribute is a float used to represent a notation between 0 and 5.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
Phone number
A phone number is a string used to represent a phone number. For example, +1 (972) 123-4567
is a valid phone number.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Case insensitive | Boolean | Case insensitive field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Byte
A byte attribute is a float used to represent a number of bytes.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
Country
A country attribute is a string used to represent a country.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Dropdown | Field default value |
Percentage
A percentage attribute is a float used to represent a percentage.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Greater than or equal to | Number | Field value must be greater than or equal to |
Equal to | Number | Field value must be equal to |
Less than | Number | Field value must be less than |
Less than or equal to | Number | Field value must be less than or equal to |
Other than | Number | Field value must be different from |
Greater than | Number | Field value must be greater than |
Default value | Number | Field default value |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
Array
An array attribute is used to represent multiple strings in a single attribute.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Multiple choice | Field default value(s) |
MIME type
A MIME type attribute is a string used to represent a media type. For example, text/csv
is a valid MIME type.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Default value | Dropdown | Field default value |
URL
A URL attribute is a case-insensitive string used to represent a URL. For example, https://www.back-office.pro
is a valid URL.
Option | Expected value | Description |
---|---|---|
Unique | Boolean | Single field value |
Required | Boolean | Required field |
Readonly | Boolean | Non-editable field |
Length | Number | Force exact text length |
Minimum | Number | Minimum text length |
Limit | Number | Maximum text length |
Default value | Text | Field default value |
Protocols | Multiple choice | http , https |
Virtual fields
Click the button then select Add a virtual field. A virtual field consists of a name, a function, and a set of options.
⚠️
The name of the virtual field should preferably be in English and without spaces. Spaces will be automatically replaced with underscores _
and accents will be removed.
Click the icon to access the virtual field options. The options are only available for a virtual field of type calculation.
Option | Expected value | Description |
---|---|---|
Unit | Text | Computation unit: $ , € , £ , ¥ , ... |
Precision | Number | Number of digits after decimal point |
Separator | Dropdown | , or . |
A function is a pseudo-language statement that allows you to concatenate, compare, or compute a virtual field.
For example, to display the full name of a user, you can use the concatenation function $last_name $first_name
. To check if a meeting is outdated, you can use the comparison function NOW() < $end_at
. To calculate the price of a product including VAT, you can use the calculation function $price * (1 + $vat / 100)
.
Description | Pseudo-language |
---|---|
Function | NOW() |
Aggregate function | SUM($foo.bar * $bar.foo) COUNT($foo.bar) AVG($foo.bar) MIN($foo.bar) MAX($foo.bar) |
Arithmetic function | ABS($foo) ROUND($foo) CEIL($foo) FLOOR($foo) SQRT($foo) |
Combinator | && || |
Operator | * + - / % | & << >> |
Comparator | <= >= < > != == NULL |
Variable | $foo.bar |
Triggers
Click the button then select Add a trigger. A trigger consists of an action and a function.
Possible actions are:
- After creation
- After save
- After deletion
- Before creation
- Before save
- Before deletion
A function is a pseudo-language statement that allows you to change the state of your resource before or after a given action. To do this, it is possible to use an assignment. For example, if you want to reduce the quantity of a product after save, you would use the following function: $quantity -= 1
.
Description | Pseudo-language |
---|---|
Function | NOW() |
Aggregate function | SUM($foo.bar * $bar.foo) COUNT($foo.bar) AVG($foo.bar) MIN($foo.bar) MAX($foo.bar) |
Arithmetic function | ABS($foo) ROUND($foo) CEIL($foo) FLOOR($foo) SQRT($foo) |
Combinator | && || |
Operator | * + - / % | & << >> |
Comparator | <= >= < > != == NULL |
Variable | $foo.bar |
Assignment | += -= *= = |
Associations
Click the button to select one of the four association types you want to add. An association consists of a name, a type, and a set of options.
One-to-one association
A one-to-one association is an association 1..1 between two entities. For example, a profile can depend on a single user and a user can depend on a single profile.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required association |
Readonly | Boolean | Non-editable association |
Association type | Dropdown | One-to-one or One-to-many |
One-to-many association
A one-to-many association is an association 1..n between two entities. For example, a task can depend on a single user but a user can depend on multiple tasks.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required association |
Readonly | Boolean | Non-editable association |
Association type | Dropdown | One-to-one or One-to-many |
Many-to-many association
An association many-to-many is an association n..n between two entities. For example, a message can depend on multiple users and a user can depend on multiple messages.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required association |
Current user association
A current user association is an association whose default value will necessarily be the current user.
Option | Expected value | Description |
---|---|---|
Required | Boolean | Required association |
Readonly | Boolean | Non-editable association |
Association type | Dropdown | One-to-one or One-to-many |