woodpecker/pkg/database
Nurahmadie 51519b62dd Actually use --driver option to set database driver for drone.
This includes refactoring database setup, and migration system.

Remove setupDatabase from main and use `Init` method from database
package.

At database package, defines Init method which actually initiate
database with options given from comand line flag. I think `--path`
wont be used anywhere so I plan to remove it later.

Both meddler and migration initiated here, then we call `Set` method
to setup all the tables, etc. Here I think I want to separate database
schema and turn it into migration script instead, later maybe.

At migration package I made some tweak to `Operation` interface.
Realized that it's ludicrous to let migration driver re-implement `Exec`
and `Query`, I made migration script to receive The whole
migrationDriver struct which contains both Operation implementor, and
the Tx itself. This made possible thanks to Go struct being able to
promote its member, now our migration is more transparent.

There's also stub implementation for bot mysql and postgresql, will
implement this really soon.
2014-03-08 12:19:28 +07:00
..
encrypt initial public commit 2014-02-07 03:10:01 -07:00
migrate Actually use --driver option to set database driver for drone. 2014-03-08 12:19:28 +07:00
schema removed github domain and url from schema.go for unit tests 2014-02-17 23:10:20 -07:00
testing Integrate migrations with drone. 2014-02-16 03:47:30 +07:00
builds.go initial public commit 2014-02-07 03:10:01 -07:00
commits.go initial public commit 2014-02-07 03:10:01 -07:00
database.go Actually use --driver option to set database driver for drone. 2014-03-08 12:19:28 +07:00
members.go fixed issue updating team member roles 2014-02-21 13:26:50 -07:00
repos.go Integrate migrations with drone. 2014-02-16 03:47:30 +07:00
settings.go Added GitHubApiUrl and GitHubDomain to settings and template 2014-02-16 11:45:14 +06:00
teams.go initial public commit 2014-02-07 03:10:01 -07:00
users.go partial fix to issue #50 and issue #37 to select token from database 2014-02-11 16:05:53 -07:00