Vixen
02b45cc4
csharp
public static class Schema

The tables, and the ordered list of statements that produce them.

Read the guide page for this →

Remarks

⚠ Migrations are a numbered list of statements, not a framework. Each Migration is applied once, in order, inside one transaction with the row that records it — so a migration that fails leaves the version where it was rather than half-applied. There is no down migration: rolling a schema backwards on a live economy is a decision with a person attached to it, and a tool that offers to do it automatically is a tool that will.

The dialect is PostgreSQL, which doc 27 M-Q3 settles: one implementation behind an interface. bigserial, uuid, bytea and on conflict are all load-bearing here, and pretending otherwise would produce SQL that is portable in the sense that it is worse everywhere.

Fields and properties (4)

  • public const int Version

    The version Steps brings a database to.

  • public const string VersionTable

    Where the applied version is recorded.

  • public static string CreateVersionTable

    Makes the table the version is read from. Run before anything can be read.

  • public static ImmutableArray<Schema.Migration> Steps

    Every migration, in order.

Used by (4)

  • MemoryPersistenceVixen.Live.Persistence
  • RepositoryTestsVixen.Live.Persistence.Tests
  • SchemaTestsVixen.Live.Persistence.Tests
  • SqlPersistenceVixen.Live.Persistence