View Source Vtc.Ecto.Postgres.Migrations (vtc v0.14.1)
Top-level migrations for creating all Vtc ecto types.
Link to this section Summary
Functions
Runs all migrations. Safe to run multiple times when updates are required.
Link to this section Functions
@spec migrate( pg_rational_opts: [include: Keyword.t(), exclude: Keyword.t()], pg_framerate_opts: [include: Keyword.t(), exclude: Keyword.t()], pg_framestamp_opts: [include: Keyword.t(), exclude: Keyword.t()], pg_framestamp_range_opts: [include: Keyword.t(), exclude: Keyword.t()] ) :: :ok
Runs all migrations. Safe to run multiple times when updates are required.
Migrations are run for:
All migrations implement both up and down functionality, and support rollbacks
out of the box.
options
Options
pg_rational_opts: Options to pass to PgRational.Migrations.create_all/0.pg_framerate_opts: Options to pass to PgFramerate.Migrations.create_all/0.pg_framestamp_opts: Options to pass to PgFramestamp.Migrations.create_all/0.pg_framestamp_range_opts: Options to pass to PgFramestamp.Rage.Migrations.create_all/0.
Required Permissions
To add the
framestamp_rangecanonical, function, we must directly add it to theframestamp_rangetype in thepg_catalogtable. In most databases, this will require elevated permissions. See thePgFramestamp.Range.Migrations.inject_canonical_function/0for more information on why this is required.You can choose to skip this step if you wish my setting the
inject_canonical?op to false, but operations that require discreet nudging of in and out points will not return correct results, and ranges with different upper/lowwer bound types will not be comparable.