1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/pkg
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
..
build Remove unreachable return. 2014-03-06 10:50:48 -08:00
channel initial public commit 2014-02-07 03:10:01 -07:00
database Actually use --driver option to set database driver for drone. 2014-03-08 12:19:28 +07:00
handler Format go code. 2014-03-06 10:45:21 -08:00
mail make smtp-auth optional 2014-02-16 22:36:01 +01:00
model Add identicon query param to GravatarPattern 2014-03-05 16:19:44 +06:00
plugin Format go code. 2014-03-06 10:45:21 -08:00
queue a bit of prep-work for adding caching 2014-03-02 22:35:01 -08:00
template Format go code. 2014-03-06 10:45:21 -08:00