migrate.sqlthat contains the following SQL:
tasksand populating it with a single record.
seeding(it will be explained shortly). The
--defaultflag means that this data will be used by default whenever a new environment is created. Later, we will see an example with some non-default snapshots as well.
psqlis the Postgres DB itself.
seedingis the name of the service responsible for seeding the data.
--targetflag had to be
seeding. The target of the snapshot is the name of the Velocity service that uses it. Each data file has precisely one target, which means that each data file is handled by precisely one seeding job.
the-appservice, you should see:
select * from tasks. And you can see in the above output that the table exists and contains one record, which is the data that was successfully seeded by the seeding job.
seeding, because we are using the same blueprints with the same seeding job. However, this time we are using the
--name special-dataflag. That means that our data file will be associated with a different snapshot named
special-datasnapshot like this:
--snapshotflag. This command means: create a new environment and don’t use the default snapshot but rather a snapshot data named
special-datasnapshot name. Note that we only uploaded one file for
special-datathat is associated with the
defaultsnapshot name. The
defaultsnapshot includes two files, each associated with
datajob is already using the data file from the
special-datasnapshot, it will not be replaced with the data from
default. However, the
migratejob is still “free,” because there wasn’t any file in the
special-datasnapshot associated with it, so that job will use the data from the
defaultsnapshot name is a special name that is always added to the end of the list, so you don’t have to add it yourself, so the following command has the same result: