MCPcopy Create free account

hub / github.com/CloudCom/goose / functions

Functions131 in github.com/CloudCom/goose

↓ 15 callersMethodExec
(args []string)
cmd/goose/cmd.go:23
↓ 9 callersFunctionRunMigrationsOnDb
Runs migration on a specific database instance.
lib/goose/migrate.go:67
↓ 7 callersMethodLen
helpers so we can use pkg sort
lib/goose/migrate.go:52
↓ 7 callersMethodString
()
lib/goose/migrate.go:24
↓ 6 callersFunctionNewDBConf
extract configuration details from the given file
lib/goose/dbconf.go:86
↓ 6 callersFunctionOpenDBFromDBConf
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 callersFunctiondbConfFromFlags
helper to create a DBConf from the given flags
cmd/goose/main.go:20
↓ 6 callersFunctionsetupDBConf
(t *testing.T, confPath string, extraPath string)
lib/goose/dbconf_test.go:15
↓ 5 callersFunctionconfGet
(f *yaml.File, env string, name string)
lib/goose/dbconf.go:72
↓ 5 callersFunctionsetupMigrationsDir
(migrationMap map[string][2]string)
lib/goose/migrate_test.go:107
↓ 4 callersFunctionfindDBConf
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 callersFunctiongetMysqlDriver
(t *testing.T)
lib/goose/migrate_test.go:25
↓ 4 callersFunctiongetPostgresDriver
(t *testing.T)
lib/goose/migrate_test.go:37
↓ 4 callersFunctiongetRedshiftDriver
(t *testing.T)
lib/goose/migrate_test.go:49
↓ 4 callersFunctiongetSqlite3Driver
(t *testing.T)
lib/goose/migrate_test.go:17
↓ 4 callersFunctiontestRunMigrationsOnDb
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:161
↓ 4 callersFunctiontestRunMigrationsOnDb_down
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:284
↓ 4 callersFunctiontestRunMigrationsOnDb_missingMiddle
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:210
↓ 4 callersFunctiontestRunMigrationsOnDb_upDownUp
(t *testing.T, driver DBDriver)
lib/goose/migrate_test.go:337
↓ 3 callersFunctionNumericComponent
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 callersFunction_filePath
(dir, name string)
lib/goose/templates.go:310
↓ 3 callersMethodinsertVersionSql
sql string to create the goose_db_version table
lib/goose/dialect.go:12
↓ 2 callersFunctionAsset
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 callersFunctionCollectMigrations
collect all the valid looking migration scripts in the migrations folder, and key them by version
lib/goose/migrate.go:142
↓ 2 callersFunctionEnsureDBVersion
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 callersMethodIsDir
()
lib/goose/templates.go:43
↓ 2 callersMethodLess
(i, j int)
lib/goose/migrate.go:54
↓ 2 callersMethodModTime
()
lib/goose/templates.go:40
↓ 2 callersMethoddbVersionQuery
sql string to insert the initial version table row
lib/goose/dialect.go:13
↓ 2 callersFunctionendsWithSemicolon
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 callersFunctionimain
()
cmd/goose/main.go:37
↓ 2 callersFunctionsplitSQLStatements
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 callersFunctionwriteTemplateToFile
common routines
lib/goose/util.go:11
↓ 1 callersFunctionAssetDir
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 callersFunctionAssetInfo
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 callersFunctionFinalizeMigration
Update the version table for the given migration, and finalize the transaction.
lib/goose/migrate.go:409
↓ 1 callersMethodIsValid
ensure we have enough info about this driver
lib/goose/dbconf.go:189
↓ 1 callersMethodMode
()
lib/goose/templates.go:37
↓ 1 callersMethodName
()
lib/goose/templates.go:31
↓ 1 callersFunctionRestoreAsset
RestoreAsset restores an asset under the given directory
lib/goose/templates.go:269
↓ 1 callersMethodSwap
(i, j int)
lib/goose/migrate.go:53
↓ 1 callersFunctioncopyFile
(dst, src string)
lib/goose/util.go:26
↓ 1 callersFunctioncreateVersionTable
Create the goose_db_version table and insert the initial 0 value into it
lib/goose/migrate.go:283
↓ 1 callersMethodcreateVersionTableSql
()
lib/goose/dialect.go:11
↓ 1 callersFunctiondestroy
()
travis.setup_redshift.go:78
↓ 1 callersFunctiondialectByName
drivers that we don't know about can ask for a dialect by name
lib/goose/dialect.go:17
↓ 1 callersFunctiongetMigrationsStatus
(conf *DBConf, db *sql.DB, migrations []*Migration)
lib/goose/migrate.go:190
↓ 1 callersFunctionnewDBDriver
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 callersFunctionprintMigrationStatus
(db *sql.DB, version int64, script string)
cmd/goose/cmd_status.go:58
↓ 1 callersFunctionrun
(args []string, env map[string]string)
cmd/goose/main_integration_test.go:10
↓ 1 callersFunctionrunGoMigration
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 callersFunctionrunSQLMigration
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 callersFunctionsetup
()
travis.setup_redshift.go:34
↓ 1 callersFunctiontemplatesMigrationGoTmplBytes
()
lib/goose/templates.go:123
↓ 1 callersFunctiontemplatesMigrationMainGoTmplBytes
()
lib/goose/templates.go:90
↓ 1 callersFunctiontemplatesMigrationSqlTmplBytes
()
lib/goose/templates.go:148
FunctionAssetNames
AssetNames returns the names of the assets.
lib/goose/templates.go:205
FunctionCreateMigration
(name, migrationType, dir string, t time.Time)
lib/goose/migrate.go:385
FunctionDown_20130106222315
(txn *sql.Tx)
_example/migrations/20130106222315_and_again.go:12
FunctionGetDBVersion
wrapper for EnsureDBVersion for callers that don't already have their own DB instance
lib/goose/migrate.go:308
FunctionGetMostRecentDBVersion
helper to identify the most recent possible version within a folder of migration scripts
lib/goose/migrate.go:359
FunctionGetPreviousDBVersion
(dirpath string, version int64)
lib/goose/migrate.go:323
FunctionMustAsset
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
lib/goose/templates.go:180
FunctionRestoreAssets
RestoreAssets restores an asset under the given directory recursively
lib/goose/templates.go:294
FunctionRunMigrations
(conf *DBConf, migrationsDir string, target int64)
lib/goose/migrate.go:56
MethodSize
()
lib/goose/templates.go:34
MethodSys
()
lib/goose/templates.go:46
FunctionTestCollectMigrations
(t *testing.T)
lib/goose/migrate_test.go:132
FunctionTestDriverSetFromEnvironmentVariable
(t *testing.T)
lib/goose/dbconf_test.go:226
FunctionTestFindDBConf_confDir
(t *testing.T)
lib/goose/dbconf_test.go:43
FunctionTestFindDBConf_deepDir
(t *testing.T)
lib/goose/dbconf_test.go:54
FunctionTestFindDBConf_pwd
(t *testing.T)
lib/goose/dbconf_test.go:62
FunctionTestImportOverride
(t *testing.T)
lib/goose/dbconf_test.go:213
FunctionTestIntegrationCreate_sql
(t *testing.T)
cmd/goose/cmd_create_integration_test.go:15
FunctionTestMigrationSorterLen
(t *testing.T)
lib/goose/migrate_test.go:61
FunctionTestMigrationSorterLess
(t *testing.T)
lib/goose/migrate_test.go:90
FunctionTestMigrationSorterSwap
(t *testing.T)
lib/goose/migrate_test.go:74
FunctionTestNewDBConf
(t *testing.T)
lib/goose/dbconf_test.go:76
FunctionTestNewDBConf_default
(t *testing.T)
lib/goose/dbconf_test.go:98
FunctionTestNewDBConf_driverDefaults
(t *testing.T)
lib/goose/dbconf_test.go:145
FunctionTestNewDBConf_driverImport
(t *testing.T)
lib/goose/dbconf_test.go:122
FunctionTestRunMigrationsOnDb_down_mysql
(t *testing.T)
lib/goose/migrate_test.go:327
FunctionTestRunMigrationsOnDb_down_postgres
(t *testing.T)
lib/goose/migrate_test.go:330
FunctionTestRunMigrationsOnDb_down_redshift
(t *testing.T)
lib/goose/migrate_test.go:333
FunctionTestRunMigrationsOnDb_down_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:324
FunctionTestRunMigrationsOnDb_missingMiddle_mysql
(t *testing.T)
lib/goose/migrate_test.go:274
FunctionTestRunMigrationsOnDb_missingMiddle_postgres
(t *testing.T)
lib/goose/migrate_test.go:277
FunctionTestRunMigrationsOnDb_missingMiddle_redshift
(t *testing.T)
lib/goose/migrate_test.go:280
FunctionTestRunMigrationsOnDb_missingMiddle_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:271
FunctionTestRunMigrationsOnDb_mysql
(t *testing.T)
lib/goose/migrate_test.go:200
FunctionTestRunMigrationsOnDb_postgres
(t *testing.T)
lib/goose/migrate_test.go:203
FunctionTestRunMigrationsOnDb_redshift
(t *testing.T)
lib/goose/migrate_test.go:206
FunctionTestRunMigrationsOnDb_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:197
FunctionTestRunMigrationsOnDb_upDownUp_mysql
(t *testing.T)
lib/goose/migrate_test.go:388
FunctionTestRunMigrationsOnDb_upDownUp_postgres
(t *testing.T)
lib/goose/migrate_test.go:391
FunctionTestRunMigrationsOnDb_upDownUp_redshift
(t *testing.T)
lib/goose/migrate_test.go:394
FunctionTestRunMigrationsOnDb_upDownUp_sqlite3
(t *testing.T)
lib/goose/migrate_test.go:385
FunctionTestSemicolons
(t *testing.T)
lib/goose/migration_sql_test.go:8
FunctionTestSplitStatements
(t *testing.T)
lib/goose/migration_sql_test.go:50
FunctionUp_20130106222315
(txn *sql.Tx)
_example/migrations/20130106222315_and_again.go:8
next →1–100 of 131, ranked by callers