Lifecycle

Most hof app commands are run from the application directory. The following commands are used in the application lifecycle.

Application Lifecycle

Deploy, Shutdown
hof app deploy
hof app shutdown
Moving code
hof app push
hof app pull

Note, push and pull do not require the application to be deployed.

Updating to a new Studios version
hof app update "<version>"
Resetting the application
hof app reset

Database Lifecycle

When you change the data model within your types you will need to run a database migration.

note this is not all changes, the following, and maybe some undocumented ones

type:
  owned: ...
  visibility: ...
  fields: ...
  relations: ...
Only migrate
hof db migrate
Migrate and reset the data
hof db seed
Completely reset the database
hof db reset

This will reset the tables, migration history, and restore to the current desired state with seed data.

Renaming fields and other design

Renaming fields and other design paths often requires adding a “rename” field.

  ...
  name: <old-name>
  rename: <new-name>

Then, do the app and database updates:

hof app push
hof db seed

and then making then name the new name.

  ...
  name: <new-name>

and finally

hof app push

See the more advanced section for further details.

Complex changes

Changing the type of a field, possibly with the name as well, can create changes which would destroy existing data. In these cases, it is often better to

  1. create new field
  2. migrate database
  3. transform data
  4. delete old field
  5. migrate database

As we find more of these cases, we will add extra configuration and transformations to enable the process to become more smooth.

Function Lifecycle

coming soon