News for hackers. Stuff that matters.
Re:Why We Chose Rails to Build Gitlab by stock_toaster on Tuesday January 22, 2019 @05:00PM (#18972995)
I personally tend to prefer migrate[1] as it doesn't require java.

[1]: https://github.com/golang-migrate/migrate

Re:Why We Chose Rails to Build Gitlab by zmmmmm on Wednesday January 23, 2019 @04:30PM (#18983200)
Java seems ideal as it will be completely cross platform and you can add / update the database drivers after the fact.

Migrate has a different binary for each platform and from what I can see, the support for each database is compiled in, so just to update a driver you are going to be maintaining that binary all over the place.

Re:Why We Chose Rails to Build Gitlab by majewsky on Tuesday January 22, 2019 @05:29PM (#18973258)
Migrate is awesome! My only issue: Since it uses bare SQL for the migrations, you have to do some lifting if you need to support multiple RDBMS with different DDLs. I have some regexes in my project to translate Postgres DDL into SQLite DDL for my test suite.
Re:Why We Chose Rails to Build Gitlab by dam5s on Tuesday January 22, 2019 @05:51PM (#18973460)
Why would you not test your code with the same RDBMS you will have in production? Especially if it’s something as easy to install as Postgres? It seems like begging for trouble...
Re:Why We Chose Rails to Build Gitlab by james-mcelwain on Tuesday January 22, 2019 @09:46PM (#18975215)
If you're using an ORM, it can be an easy way to ensure that no vendor specific stuff sneaks in. Also, until recently it was difficult to run, e.g., SQL Server in Docker, so Postgres might be easier to test with. Agreed SQLite is a weird choice, but not all integration tests are robust enough to test characteristics of the underlying db, i.e. focus on business logic not performance.
Re:Why We Chose Rails to Build Gitlab by majewsky on Thursday January 24, 2019 @07:09AM (#18987955)
I have several dozen tests that run in completely separate DBs. With SQLite, the test suite runs through in 1 second:

  $ time go test github.com/sapcc/limes/... | grep -v 'no test files'
  ok      github.com/sapcc/limes  0.004s
  ok      github.com/sapcc/limes/pkg/api  0.515s
  ok      github.com/sapcc/limes/pkg/collector    0.449s
  ok      github.com/sapcc/limes/pkg/core 0.006s
I doubt that you can setup and tear down several dozen Postgreses in that time.
Re:Why We Chose Rails to Build Gitlab by axelfontaine on Tuesday January 22, 2019 @06:03PM (#18973577)
Flyway doesn't require Java. The CLI ships with a private JRE as well as drivers for most databases out of the box. Simply untar and run.