Versions in this module Expand all Collapse all v0 v0.2.0 Jan 23, 2015 Changes in this version + type Alterer interface + CreateColumn func(*schema.Table, *schema.Column) error + CreateIndex func(*schema.Table, schema.Index) error + CreateTable func(*schema.Table) error + HasColumn func(*schema.Table, *schema.Column) (bool, error) + HasIndex func(*schema.Table, schema.Index) (bool, error) + HasTable func(*schema.Table) (bool, error) + ModifyColumn func(*schema.Table, *schema.Column) error + RemoveColumn func(*schema.Table, *schema.Column) error + RemoveIndex func(*schema.Table, schema.Index) error + RemoveTable func(*schema.Table) error + RenameColumn func(*schema.Table, *schema.Column) error + RenameTable func(*schema.Table, string) error + UpdateTable func(*schema.Table) error + type Database struct + DB *sql.DB + DBMS System + Log *log.Logger + ModifiedTables []*schema.Table + NewTables []*schema.Table + Schema schema.Schema + func (d *Database) ForeignKeysSatisfied(table *schema.Table) bool + func (d *Database) Migrate() error + func (d *Database) PareFields() error + func (d *Database) SetAlterer() + func (d *Database) UpToDate() (bool, error) + type GenericDB struct + Convert Translator + DB *sql.DB + LengthableColumns map[string]bool + Log *log.Logger + PrimaryKeyDef string + Specific Alterer + func (g *GenericDB) CreateColumn(table *schema.Table, col *schema.Column) error + func (g *GenericDB) CreateIndex(table *schema.Table, index schema.Index) error + func (g *GenericDB) CreateTable(table *schema.Table) error + func (g *GenericDB) HasColumn(table *schema.Table, col *schema.Column) (bool, error) + func (g *GenericDB) HasIndex(table *schema.Table, index schema.Index) (bool, error) + func (g *GenericDB) HasTable(table *schema.Table) (bool, error) + func (g *GenericDB) ModifyColumn(table *schema.Table, col *schema.Column) error + func (g *GenericDB) RemoveColumn(table *schema.Table, col *schema.Column) error + func (g *GenericDB) RemoveIndex(table *schema.Table, index schema.Index) error + func (g *GenericDB) RemoveTable(table *schema.Table) error + func (g *GenericDB) RenameColumn(table *schema.Table, col *schema.Column) error + func (g *GenericDB) RenameTable(table *schema.Table, oldName string) error + func (g *GenericDB) UpdateTable(table *schema.Table) error + type MysqlDB struct + func (*MysqlDB) LengthableColumns() map[string]bool + func (*MysqlDB) String() string + func (m *MysqlDB) CreateIndex(table *schema.Table, index schema.Index) error + func (m *MysqlDB) CreateTable(table *schema.Table) error + func (m *MysqlDB) UpdateTable(table *schema.Table) error + type PostgresDB struct + func (*PostgresDB) String() string + func (p *PostgresDB) CreateIndex(table *schema.Table, index schema.Index) error + func (p *PostgresDB) CreateTable(table *schema.Table) error + func (p *PostgresDB) HasColumn(table *schema.Table, col *schema.Column) (bool, error) + func (p *PostgresDB) HasIndex(table *schema.Table, index schema.Index) (bool, error) + func (p *PostgresDB) LengthableColumns() map[string]bool + func (p *PostgresDB) UpdateTable(table *schema.Table) error + func (p PostgresDB) HasTable(table *schema.Table) (bool, error) + type SqliteDB struct + func (*SqliteDB) LengthableColumns() map[string]bool + func (*SqliteDB) String() string + func (s *SqliteDB) CreateIndex(table *schema.Table, index schema.Index) error + func (s *SqliteDB) CreateTable(table *schema.Table) error + func (s *SqliteDB) HasColumn(table *schema.Table, col *schema.Column) (bool, error) + func (s *SqliteDB) HasIndex(table *schema.Table, index schema.Index) (bool, error) + func (s *SqliteDB) HasTable(table *schema.Table) (bool, error) + func (s *SqliteDB) UpdateTable(table *schema.Table) error + type System int + const Generic + const MySQL + const Postgres + const Sqlite + type Translator interface + SQLColumn func(string, string) string + SQLTable func(string) string