From 9a0b29d8b1228900e9534ab6a240671cffb113e7 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Tue, 11 Mar 2014 15:10:13 +0700 Subject: [PATCH] Remove database.Set, all setup being done in database.Init now. --- pkg/database/database.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/database/database.go b/pkg/database/database.go index 89eaf4782..2c2ff216a 100644 --- a/pkg/database/database.go +++ b/pkg/database/database.go @@ -3,10 +3,8 @@ package database import ( "database/sql" "fmt" - "log" "github.com/drone/drone/pkg/database/migrate" - "github.com/drone/drone/pkg/database/schema" _ "github.com/go-sql-driver/mysql" _ "github.com/mattn/go-sqlite3" @@ -57,19 +55,6 @@ func Init(name, datasource string) error { return nil } -// Set sets the default database. -func Set(database *sql.DB) { - // set the global database - db = database - - // load the database schema. If this is - // a new database all the tables and - // indexes will be created. - if err := schema.Load(db); err != nil { - log.Fatal(err) - } -} - func Close() { db.Close() }