Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CloudCom/goose
/ functions
Functions
131 in github.com/CloudCom/goose
⨍
Functions
131
◇
Types & classes
17
↓ 15 callers
Method
Exec
(args []string)
cmd/goose/cmd.go:23
↓ 9 callers
Function
RunMigrationsOnDb
Runs migration on a specific database instance.
lib/goose/migrate.go:67
↓ 7 callers
Method
Len
helpers so we can use pkg sort
lib/goose/migrate.go:52
↓ 7 callers
Method
String
()
lib/goose/migrate.go:24
↓ 6 callers
Function
NewDBConf
extract configuration details from the given file
lib/goose/dbconf.go:86
↓ 6 callers
Function
OpenDBFromDBConf
OpenDBFromDBConf wraps database/sql.DB.Open() and configures the newly opened DB based on the given DBConf. Callers must Close() the returned DB.
lib/goose/dbconf.go:197
↓ 6 callers
Function
dbConfFromFlags
helper to create a DBConf from the given flags
cmd/goose/main.go:20
↓ 6 callers
Function
setupDBConf
(t *testing.T, confPath string, extraPath string)
lib/goose/dbconf_test.go:15
↓ 5 callers
Function
confGet
(f *yaml.File, env string, name string)
lib/goose/dbconf.go:72
↓ 5 callers
Function
setupMigrationsDir
(migrationMap map[string][2]string)
lib/goose/migrate_test.go:107
↓ 4 callers
Function
findDBConf
findDBConf looks for a dbconf.yaml file starting at the given directory and walking up in the directory hierarchy. Returns empty string if not found.
lib/goose/dbconf.go:40
↓ 4 callers
Function
getMysqlDriver
(t *testing.T)
lib/goose/migrate_test.go:25
↓ 4 callers
Function
getPostgresDriver
(t *testing.T)
lib/goose/migrate_test.go:37
↓ 4 callers
Function
getRedshiftDriver
(t *testing.T)
lib/goose/migrate_test.go:49
↓ 4 callers
Function
getSqlite3Driver
(t *testing.T)
lib/goose/migrate_test.go:17
↓ 4 callers
Function
testRunMigrationsOnDb
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:161
↓ 4 callers
Function
testRunMigrationsOnDb_down
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:284
↓ 4 callers
Function
testRunMigrationsOnDb_missingMiddle
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:210
↓ 4 callers
Function
testRunMigrationsOnDb_upDownUp
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:337
↓ 3 callers
Function
NumericComponent
look for migration scripts with names in the form: XXX_descriptivename.ext where XXX specifies the version number and ext specifies the type of migrat
lib/goose/migrate.go:170
↓ 3 callers
Function
_filePath
(dir, name string)
lib/goose/templates.go:310
↓ 3 callers
Method
insertVersionSql
sql string to create the goose_db_version table
lib/goose/dialect.go:12
↓ 2 callers
Function
Asset
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
lib/goose/templates.go:166
↓ 2 callers
Function
CollectMigrations
collect all the valid looking migration scripts in the migrations folder, and key them by version
lib/goose/migrate.go:142
↓ 2 callers
Function
EnsureDBVersion
retrieve the current version for this DB. Create and initialize the DB version table if it doesn't exist.
lib/goose/migrate.go:234
↓ 2 callers
Method
IsDir
()
lib/goose/templates.go:43
↓ 2 callers
Method
Less
(i, j int)
lib/goose/migrate.go:54
↓ 2 callers
Method
ModTime
()
lib/goose/templates.go:40
↓ 2 callers
Method
dbVersionQuery
sql string to insert the initial version table row
lib/goose/dialect.go:13
↓ 2 callers
Function
endsWithSemicolon
Checks the line to see if the line has a statement-ending semicolon or if the line contains a double-dash comment.
lib/goose/migration_sql.go:18
↓ 2 callers
Function
imain
()
cmd/goose/main.go:37
↓ 2 callers
Function
splitSQLStatements
Split the given sql script into individual statements. The base case is to simply split on semicolons, as these naturally terminate a statement. How
lib/goose/migration_sql.go:44
↓ 2 callers
Function
writeTemplateToFile
common routines
lib/goose/util.go:11
↓ 1 callers
Function
AssetDir
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data c
lib/goose/templates.go:233
↓ 1 callers
Function
AssetInfo
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
lib/goose/templates.go:192
↓ 1 callers
Function
FinalizeMigration
Update the version table for the given migration, and finalize the transaction.
lib/goose/migrate.go:409
↓ 1 callers
Method
IsValid
ensure we have enough info about this driver
lib/goose/dbconf.go:189
↓ 1 callers
Method
Mode
()
lib/goose/templates.go:37
↓ 1 callers
Method
Name
()
lib/goose/templates.go:31
↓ 1 callers
Function
RestoreAsset
RestoreAsset restores an asset under the given directory
lib/goose/templates.go:269
↓ 1 callers
Method
Swap
(i, j int)
lib/goose/migrate.go:53
↓ 1 callers
Function
copyFile
(dst, src string)
lib/goose/util.go:26
↓ 1 callers
Function
createVersionTable
Create the goose_db_version table and insert the initial 0 value into it
lib/goose/migrate.go:283
↓ 1 callers
Method
createVersionTableSql
()
lib/goose/dialect.go:11
↓ 1 callers
Function
destroy
()
travis.setup_redshift.go:78
↓ 1 callers
Function
dialectByName
drivers that we don't know about can ask for a dialect by name
lib/goose/dialect.go:17
↓ 1 callers
Function
getMigrationsStatus
(conf *DBConf, db *sql.DB, migrations []*Migration)
lib/goose/migrate.go:190
↓ 1 callers
Function
newDBDriver
Create a new DBDriver and populate driver specific fields for drivers that we know about. Further customization may be done in NewDBConf
lib/goose/dbconf.go:154
↓ 1 callers
Function
printMigrationStatus
(db *sql.DB, version int64, script string)
cmd/goose/cmd_status.go:58
↓ 1 callers
Function
run
(args []string, env map[string]string)
cmd/goose/main_integration_test.go:10
↓ 1 callers
Function
runGoMigration
Run a .go migration. In order to do this, we copy a modified version of the original .go migration, and execute it via `go run` along with a main()
lib/goose/migration_go.go:37
↓ 1 callers
Function
runSQLMigration
Run a migration specified in raw SQL. Sections of the script can be annotated with a special comment, starting with "-- +goose" to specify whether th
lib/goose/migration_sql.go:137
↓ 1 callers
Function
setup
()
travis.setup_redshift.go:34
↓ 1 callers
Function
templatesMigrationGoTmplBytes
()
lib/goose/templates.go:123
↓ 1 callers
Function
templatesMigrationMainGoTmplBytes
()
lib/goose/templates.go:90
↓ 1 callers
Function
templatesMigrationSqlTmplBytes
()
lib/goose/templates.go:148
Function
AssetNames
AssetNames returns the names of the assets.
lib/goose/templates.go:205
Function
CreateMigration
(name, migrationType, dir string, t time.Time)
lib/goose/migrate.go:385
Function
Down_20130106222315
(txn *sql.Tx)
_example/migrations/20130106222315_and_again.go:12
Function
GetDBVersion
wrapper for EnsureDBVersion for callers that don't already have their own DB instance
lib/goose/migrate.go:308
Function
GetMostRecentDBVersion
helper to identify the most recent possible version within a folder of migration scripts
lib/goose/migrate.go:359
Function
GetPreviousDBVersion
(dirpath string, version int64)
lib/goose/migrate.go:323
Function
MustAsset
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
lib/goose/templates.go:180
Function
RestoreAssets
RestoreAssets restores an asset under the given directory recursively
lib/goose/templates.go:294
Function
RunMigrations
(conf *DBConf, migrationsDir string, target int64)
lib/goose/migrate.go:56
Method
Size
()
lib/goose/templates.go:34
Method
Sys
()
lib/goose/templates.go:46
Function
TestCollectMigrations
(t *testing.T)
lib/goose/migrate_test.go:132
Function
TestDriverSetFromEnvironmentVariable
(t *testing.T)
lib/goose/dbconf_test.go:226
Function
TestFindDBConf_confDir
(t *testing.T)
lib/goose/dbconf_test.go:43
Function
TestFindDBConf_deepDir
(t *testing.T)
lib/goose/dbconf_test.go:54
Function
TestFindDBConf_pwd
(t *testing.T)
lib/goose/dbconf_test.go:62
Function
TestImportOverride
(t *testing.T)
lib/goose/dbconf_test.go:213
Function
TestIntegrationCreate_sql
(t *testing.T)
cmd/goose/cmd_create_integration_test.go:15
Function
TestMigrationSorterLen
(t *testing.T)
lib/goose/migrate_test.go:61
Function
TestMigrationSorterLess
(t *testing.T)
lib/goose/migrate_test.go:90
Function
TestMigrationSorterSwap
(t *testing.T)
lib/goose/migrate_test.go:74
Function
TestNewDBConf
(t *testing.T)
lib/goose/dbconf_test.go:76
Function
TestNewDBConf_default
(t *testing.T)
lib/goose/dbconf_test.go:98
Function
TestNewDBConf_driverDefaults
(t *testing.T)
lib/goose/dbconf_test.go:145
Function
TestNewDBConf_driverImport
(t *testing.T)
lib/goose/dbconf_test.go:122
Function
TestRunMigrationsOnDb_down_mysql
(t *testing.T)
lib/goose/migrate_test.go:327
Function
TestRunMigrationsOnDb_down_postgres
(t *testing.T)
lib/goose/migrate_test.go:330
Function
TestRunMigrationsOnDb_down_redshift
(t *testing.T)
lib/goose/migrate_test.go:333
Function
TestRunMigrationsOnDb_down_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:324
Function
TestRunMigrationsOnDb_missingMiddle_mysql
(t *testing.T)
lib/goose/migrate_test.go:274
Function
TestRunMigrationsOnDb_missingMiddle_postgres
(t *testing.T)
lib/goose/migrate_test.go:277
Function
TestRunMigrationsOnDb_missingMiddle_redshift
(t *testing.T)
lib/goose/migrate_test.go:280
Function
TestRunMigrationsOnDb_missingMiddle_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:271
Function
TestRunMigrationsOnDb_mysql
(t *testing.T)
lib/goose/migrate_test.go:200
Function
TestRunMigrationsOnDb_postgres
(t *testing.T)
lib/goose/migrate_test.go:203
Function
TestRunMigrationsOnDb_redshift
(t *testing.T)
lib/goose/migrate_test.go:206
Function
TestRunMigrationsOnDb_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:197
Function
TestRunMigrationsOnDb_upDownUp_mysql
(t *testing.T)
lib/goose/migrate_test.go:388
Function
TestRunMigrationsOnDb_upDownUp_postgres
(t *testing.T)
lib/goose/migrate_test.go:391
Function
TestRunMigrationsOnDb_upDownUp_redshift
(t *testing.T)
lib/goose/migrate_test.go:394
Function
TestRunMigrationsOnDb_upDownUp_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:385
Function
TestSemicolons
(t *testing.T)
lib/goose/migration_sql_test.go:8
Function
TestSplitStatements
(t *testing.T)
lib/goose/migration_sql_test.go:50
Function
Up_20130106222315
(txn *sql.Tx)
_example/migrations/20130106222315_and_again.go:8
next →
1–100 of 131, ranked by callers