Documentation ¶
Index ¶
- Variables
- type Migration
- type MigrationDriver
- type Operation
- type Rev1
- type Rev3
- type Revision
- type SQLiteDriver
- func (s *SQLiteDriver) AddColumn(tableName, columnSpec string) (sql.Result, error)
- func (s *SQLiteDriver) CreateTable(tableName string, args []string) (sql.Result, error)
- func (s *SQLiteDriver) DropColumns(tableName string, columnsToDrop []string) (sql.Result, error)
- func (s *SQLiteDriver) DropTable(tableName string) (sql.Result, error)
- func (s *SQLiteDriver) Exec(query string, args ...interface{}) (sql.Result, error)
- func (s *SQLiteDriver) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (s *SQLiteDriver) QueryRow(query string, args ...interface{}) *sql.Row
- func (s *SQLiteDriver) RenameColumns(tableName string, columnChanges map[string]string) (sql.Result, error)
- func (s *SQLiteDriver) RenameTable(tableName, newName string) (sql.Result, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Driver func(tx *sql.Tx) Operation
View Source
var GitHubEnterpriseSupport = &Rev3{}
View Source
var RenamePrivelegedToPrivileged = &Rev1{}
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
type MigrationDriver ¶
type Operation ¶
type Operation interface { CreateTable(tableName string, args []string) (sql.Result, error) RenameTable(tableName, newName string) (sql.Result, error) DropTable(tableName string) (sql.Result, error) AddColumn(tableName, columnSpec string) (sql.Result, error) DropColumns(tableName string, columnsToDrop []string) (sql.Result, error) RenameColumns(tableName string, columnChanges map[string]string) (sql.Result, error) Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row }
Operation interface covers basic migration operations. Implementation details is specific for each database, see migrate/sqlite.go for implementation reference.
type SQLiteDriver ¶
type SQLiteDriver MigrationDriver
func (*SQLiteDriver) AddColumn ¶
func (s *SQLiteDriver) AddColumn(tableName, columnSpec string) (sql.Result, error)
func (*SQLiteDriver) CreateTable ¶
func (*SQLiteDriver) DropColumns ¶
func (*SQLiteDriver) DropTable ¶
func (s *SQLiteDriver) DropTable(tableName string) (sql.Result, error)
func (*SQLiteDriver) Exec ¶
func (s *SQLiteDriver) Exec(query string, args ...interface{}) (sql.Result, error)
func (*SQLiteDriver) Query ¶
func (s *SQLiteDriver) Query(query string, args ...interface{}) (*sql.Rows, error)
func (*SQLiteDriver) QueryRow ¶
func (s *SQLiteDriver) QueryRow(query string, args ...interface{}) *sql.Row
func (*SQLiteDriver) RenameColumns ¶
func (*SQLiteDriver) RenameTable ¶
func (s *SQLiteDriver) RenameTable(tableName, newName string) (sql.Result, error)
Click to show internal directories.
Click to hide internal directories.