Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMigrations ¶
Run applies migrations from migrationsFolder to database.
Types ¶
type CassandraDatabase ¶
type CassandraDatabase struct {
// contains filtered or unexported fields
}
func NewCassandraDatabase ¶
func NewCassandraDatabase(readerSession *gocql.Session, writerSession *gocql.Session) *CassandraDatabase
func (*CassandraDatabase) CreateMigrationsTable ¶
func (cassandra *CassandraDatabase) CreateMigrationsTable() error
func (*CassandraDatabase) HasMigrated ¶
func (cassandra *CassandraDatabase) HasMigrated(filename string) (bool, error)
type PostgresDatabase ¶
type PostgresDatabase struct {
// contains filtered or unexported fields
}
func NewPostgresDatabase ¶
func NewPostgresDatabase(db *sql.DB) *PostgresDatabase
func (*PostgresDatabase) CreateMigrationsTable ¶
func (postgres *PostgresDatabase) CreateMigrationsTable() error
func (*PostgresDatabase) HasMigrated ¶
func (postgres *PostgresDatabase) HasMigrated(filename string) (bool, error)
Click to show internal directories.
Click to hide internal directories.