class CommunityDbMigrations extends DbMigrations with NamedLogging
- Alphabetic
- By Inheritance
- CommunityDbMigrations
- NamedLogging
- DbMigrations
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CommunityDbMigrations(dbConfig: DbConfig, devVersionSupport: Boolean, loggerFactory: NamedLoggerFactory)(implicit closeContext: CloseContext)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkDbVersion(timeouts: ProcessingTimeout, standardConfig: Boolean)(implicit tc: TraceContext): EitherT[UnlessShutdown, Error, Unit]
- Definition Classes
- DbMigrations
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- implicit val closeContext: CloseContext
- Attributes
- protected
- Definition Classes
- CommunityDbMigrations → DbMigrations
- def connectionCheck(failFast: Boolean, processingTimeout: ProcessingTimeout)(implicit tc: TraceContext): EitherT[UnlessShutdown, Error, Unit]
- Definition Classes
- DbMigrations
- def createDataSource(jdbcDataSource: JdbcDataSource): DataSource
- Attributes
- protected
- Definition Classes
- DbMigrations
- def createFlyway(dataSource: DataSource): Flyway
Database is migrated using Flyway, which looks at the migration files at src/main/resources/db/migration/canton as explained at https://flywaydb.org/documentation/getstarted/firststeps/api
Database is migrated using Flyway, which looks at the migration files at src/main/resources/db/migration/canton as explained at https://flywaydb.org/documentation/getstarted/firststeps/api
- Attributes
- protected
- Definition Classes
- DbMigrations
- val dbConfig: DbConfig
- Attributes
- protected
- Definition Classes
- CommunityDbMigrations → DbMigrations
- val devVersionSupport: Boolean
Whether we want to add the schema files found in the dev folder to the migration
Whether we want to add the schema files found in the dev folder to the migration
A user that does that, won't be able to upgrade to new Canton versions, as we reserve our right to just modify the dev version files in any way we like.
- Attributes
- protected
- Definition Classes
- CommunityDbMigrations → DbMigrations
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- Definition Classes
- CommunityDbMigrations → NamedLogging
- implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- def migrateDatabase(): EitherT[UnlessShutdown, Error, Unit]
Migrate the database with all pending migrations.
Migrate the database with all pending migrations.
- Definition Classes
- DbMigrations
- def migrateDatabaseInternal(db: slick.jdbc.JdbcBackend.Database)(implicit traceContext: TraceContext): EitherT[UnlessShutdown, Error, Unit]
- Attributes
- protected
- Definition Classes
- DbMigrations
- def migrateIfFresh(): EitherT[UnlessShutdown, Error, Unit]
Migrate a database if it is empty, otherwise skip the migration.
Migrate a database if it is empty, otherwise skip the migration.
- Definition Classes
- DbMigrations
- def migrateIfFreshAndCheckPending(): EitherT[UnlessShutdown, Error, Unit]
Combined method of migrateIfFresh and checkPendingMigration, avoids creating multiple pools
Combined method of migrateIfFresh and checkPendingMigration, avoids creating multiple pools
- Definition Classes
- DbMigrations
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def repairFlywayMigration(): EitherT[UnlessShutdown, Error, Unit]
Repair the database in case the migrations files changed (e.g.
Repair the database in case the migrations files changed (e.g. due to comment changes) To quote the Flyway documentation:
Repair is your tool to fix issues with the schema history table. It has a few main uses:
- Remove failed migration entries (only for databases that do NOT support DDL transactions) - Realign the checksums, descriptions, and types of the applied migrations with the ones of the available migrations - Mark all missing migrations as deleted
- Definition Classes
- DbMigrations
- def repairFlywayMigrationInternal(db: slick.jdbc.JdbcBackend.Database)(implicit traceContext: TraceContext): EitherT[UnlessShutdown, Error, Unit]
- Attributes
- protected
- Definition Classes
- DbMigrations
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withCreatedDb[A](fn: (slick.jdbc.JdbcBackend.Database) => EitherT[UnlessShutdown, Error, A]): EitherT[UnlessShutdown, Error, A]
- Attributes
- protected
- Definition Classes
- DbMigrations
- def withDb[A](fn: (slick.jdbc.JdbcBackend.Database) => EitherT[UnlessShutdown, Error, A])(implicit traceContext: TraceContext): EitherT[UnlessShutdown, Error, A]
Obtain access to the database to run the migration operation.
Obtain access to the database to run the migration operation.
- Attributes
- protected
- Definition Classes
- CommunityDbMigrations → DbMigrations
- def withFlyway[A](fn: (slick.jdbc.JdbcBackend.Database, Flyway) => EitherT[UnlessShutdown, Error, A])(implicit traceContext: TraceContext): EitherT[UnlessShutdown, Error, A]
- Attributes
- protected
- Definition Classes
- DbMigrations