mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
* chore: Initial database scaffolding This implements migrations and code generation for interfacing with a PostgreSQL database. A dependency is added for the "postgres" binary on the host, but that seems like an acceptable requirement considering it's our primary database. An in-memory database object can be created for simple cross-OS and fast testing. * Run tests in CI * Use Docker instead of binaries on the host * Skip database tests on non-Linux operating systems * chore: Add golangci-lint and codecov * Use consistent file names
12 lines
251 B
Bash
Executable File
12 lines
251 B
Bash
Executable File
#!/usr/bin/env bash
|
|
cd "$(dirname "$0")"
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "First argument is the migration name!"
|
|
exit 1
|
|
fi
|
|
|
|
migrate create -ext sql -dir . -seq $1
|
|
|
|
echo "After making adjustments, run \"make database/generate\" to generate models."
|