Skip to content

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.

OptionExpected valueDescription
DescriptorDropdownMost representative field of your entity
ActionsMultiple choiceAdd, Archive, Read, Edit, List, Delete
IconDropdownEntity 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.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
AcceptanceBooleanMust be accepted field
Default valueBooleanTrue or False

String

A string attribute is a text segment that can be represented on a single line.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
TranslatedBooleanEnable field translations
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
FormattingDropdownUppercase, Lowercase or Capitalize
Default valueTextField default value

Date

A date attribute is used to represent the day, month, and year.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Start dateBooleanStart of calendar date
End dateBooleanEnd of calendar date
Greater than or equal toDropdownField value must be greater than or equal to
Equal toDropdownField value must be equal to
Less thanDropdownField value must be less than
Less than or equal toDropdownField value must be less than or equal to
Other thanDropdownField value must be different from
Greater thanDropdownField value must be greater than
Default valueDateField default value

Document

A document attribute is a single file attached to your entity.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
SizeNumberMaximum document size in megabytes
WidthNumberMaximum document width in pixels
HeightNumberMaximum document height in pixels
Aspect ratioDropdown16/9, 4/3, Square or Landscape
Content typeMultiple choicegif, jpeg, mp3, pdf, txt...

Secret

A secret attribute is used to hide a secret key.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueTextField default value
FormattingDropdownUppercase, Lowercase or Capitalize

State machine

A state machine attribute is used to model a workflow.

OptionExpected valueDescription
RequiredBooleanRequired field
Default valueDropdownField default value
ValuesMultiple choicePossible 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.

OptionExpected valueDescription
Request confirmationBooleanRequest confirmation before triggering the event
NameTextEvent name
IconDropdownEvent icon
ColorDropdownColor of the badge / button associated with the event
FromMultiple choiceEvent transition starting value(s)
ToDropdownEvent transition end value
FunctionTextFunction called after the event

Integer

An integer attribute is a number that does not have a decimal point digit.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Auto incrementBooleanAutomatic increment of the field value
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
UnitTextUnit of number: $, , £, ¥, %, bytes, ...

Text

A text attribute is a set of characters that can be represented on multiple lines.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
TranslatedBooleanEnable field translations
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
FormattingDropdownUppercase, Lowercase or Capitalize
Default valueTextField default value

Address

An address attribute is a string used to represent a mailing address.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
FormattingDropdownUppercase, Lowercase or Capitalize
Default valueTextField 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField 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.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value

Color

A color attribute is a string used to represent a hexadecimal color code. For example, #000000 is a valid color code.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField default value

Datetime

A datetime attribute is used to represent the day, month, year, as well as hours and minutes.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Start dateBooleanStart of calendar date
End dateBooleanEnd of calendar date
Greater than or equal toDropdownField value must be greater than or equal to
Equal toDropdownField value must be equal to
Less thanDropdownField value must be less than
Less than or equal toDropdownField value must be less than or equal to
Other thanDropdownField value must be different from
Greater thanDropdownField value must be greater than
Default valueDatetimeField default value

Currency

A currency attribute is a float used to represent a currency. For example, dollars or euros.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
UnitTextCurrency unit: $, , £, ¥, ...
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, or .

Documents

A documents attribute is a set of files attached to your entity.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
SizeNumberMaximum document size in megabytes
WidthNumberMaximum document width in pixels
HeightNumberMaximum document height in pixels
MinimumNumberMinimum number of documents allowed
MaximumNumberMaximum number of documents allowed
Aspect ratioDropdown16/9, 4/3, Square or Landscape
Content typeMultiple choicegif, jpeg, mp3, pdf, txt...

Duration

A duration attribute is an integer used to represent a duration. For example, seconds or milliseconds.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
UnitTextUnit of duration: ms, s, m, h, ...

Email

An email attribute is case-insensitive string that can be used to represent an email address.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField 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.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
TranslatedBooleanEnable field translations
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField default value
LanguageDropdownc, 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.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
TranslatedBooleanEnable field translations

Enumeration

An enumeration attribute allows you to choose a single data from a set of values.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueDropdownField default value
ValuesMultiple choicePossible values for enumeration

Flag

A flag attribute allows you to choose one or more pieces of data from a set of values.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueMultiple choiceField default value(s)
ValuesMultiple choicePossible 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueDropdownField default value

Time

An hour attribute is used to represent hours and minutes.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toDropdownField value must be greater than or equal to
Equal toDropdownField value must be equal to
Less thanDropdownField value must be less than
Less than or equal toDropdownField value must be less than or equal to
Other thanDropdownField value must be different from
Greater thanDropdownField value must be greater than
Default valueTimeField default value

JSON

A JSON attribute is used to represent data in JSON format. For example, { foo: true } is a valid JSON.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueTextIn JSON format { foo: true }

Token

A token attribute represents a one-time token. This token can be used in authentication systems, for example.

OptionExpected valueDescription
RequiredBooleanRequired field

Password

A password attribute is used to represent a password.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
ConfirmationBooleanAdd a password confirmation field
MinimumNumberMinimum password length
Default valueTextField 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.

OptionExpected valueDescription
RequiredBooleanRequired 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.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Auto incrementBooleanAutomatic increment of the field value
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
UnitTextUnit of number: $, , £, ¥, %, bytes, ...
PrecisionNumberNumber of digits after decimal point
ScaleNumberNumber of digits before decimal point
SeparatorDropdown, or .

Float

A float attribute is a number that has digits after the decimal point.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Auto incrementBooleanAutomatic increment of the field value
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
UnitTextUnit of number: $, , £, ¥, %, bytes, ...
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, or .

Rating

A rating attribute is a float used to represent a notation between 0 and 5.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Case insensitiveBooleanCase insensitive field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField default value

Byte

A byte attribute is a float used to represent a number of bytes.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, or .

Country

A country attribute is a string used to represent a country.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueDropdownField default value

Percentage

A percentage attribute is a float used to represent a percentage.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Greater than or equal toNumberField value must be greater than or equal to
Equal toNumberField value must be equal to
Less thanNumberField value must be less than
Less than or equal toNumberField value must be less than or equal to
Other thanNumberField value must be different from
Greater thanNumberField value must be greater than
Default valueNumberField default value
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, or .

Array

An array attribute is used to represent multiple strings in a single attribute.

OptionExpected valueDescription
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueMultiple choiceField 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
Default valueDropdownField 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.

OptionExpected valueDescription
UniqueBooleanSingle field value
RequiredBooleanRequired field
ReadonlyBooleanNon-editable field
LengthNumberForce exact text length
MinimumNumberMinimum text length
LimitNumberMaximum text length
Default valueTextField default value
ProtocolsMultiple choicehttp, 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.

OptionExpected valueDescription
UnitTextComputation unit: $, , £, ¥, ...
PrecisionNumberNumber of digits after decimal point
SeparatorDropdown, 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).

DescriptionPseudo-language
FunctionNOW()
Aggregate functionSUM($foo.bar * $bar.foo) COUNT($foo.bar) AVG($foo.bar) MIN($foo.bar) MAX($foo.bar)
Arithmetic functionABS($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.

DescriptionPseudo-language
FunctionNOW()
Aggregate functionSUM($foo.bar * $bar.foo) COUNT($foo.bar) AVG($foo.bar) MIN($foo.bar) MAX($foo.bar)
Arithmetic functionABS($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.

OptionExpected valueDescription
RequiredBooleanRequired association
ReadonlyBooleanNon-editable association
Association typeDropdownOne-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.

OptionExpected valueDescription
RequiredBooleanRequired association
ReadonlyBooleanNon-editable association
Association typeDropdownOne-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.

OptionExpected valueDescription
RequiredBooleanRequired association

Current user association

A current user association is an association whose default value will necessarily be the current user.

OptionExpected valueDescription
RequiredBooleanRequired association
ReadonlyBooleanNon-editable association
Association typeDropdownOne-to-one or One-to-many