Progress on database schema migration for account -> org refactor

This commit is contained in:
Torkel Ödegaard
2015-02-24 11:46:34 +01:00
parent da41d99aa7
commit 02a89c752b
16 changed files with 595 additions and 193 deletions

View File

@ -1,5 +1,7 @@
package migrator
import "fmt"
type Sqlite3 struct {
BaseDialect
}
@ -57,3 +59,10 @@ func (db *Sqlite3) TableCheckSql(tableName string) (string, []interface{}) {
args := []interface{}{tableName}
return "SELECT name FROM sqlite_master WHERE type='table' and name = ?", args
}
func (db *Sqlite3) DropIndexSql(tableName string, index *Index) string {
quote := db.Quote
//var unique string
idxName := index.XName(tableName)
return fmt.Sprintf("DROP INDEX %v", quote(idxName))
}