aboutsummaryrefslogtreecommitdiffstats
path: root/license-generator/.env.sample
AgeCommit message (Collapse)Author
2018-11-09.env.sample: Add `LOG_FILE` variableTeddy Wing
2018-11-09.env.sample: Add `DATABASE_URL` variableTeddy Wing
Add a new variable for the regular database URL, and move the existing one, which includes the `tcp(hostname)` format to `GO_DATABASE_URL`. We need to keep the existing one for use with the 'migrate' command, but I want a regular database URL to be able to use inside the main web program.
2018-11-09.env.sample: Add `migrate` wrapper functionsTeddy Wing
Wrap all `migrate` subcommands. Turns out we do need the `-path` argument for the other commands. Doesn't appear to work correctly for `create`, but for the others it works fine.
2018-11-09.env.sample: Add `migrate` functionTeddy Wing
Wraps the `migrate` command (https://github.com/golang-migrate/migrate). The command requires you to pass in a bunch of shell options that should be constant for an application. Encode those constants in this wrapper function. Now all you need to do is run: $ migrate migration_name and the correct migrations will be generated. The migrations get created in the current directory. I tried passing -source file://migrations , -source file://./migrations , and -path migrations but no combination seemed to put the generated migration files in the migrations/ directory. Settled on moving the files manually in the helper function.
2018-11-09Add database configTeddy Wing
Use 'migrant' for migrations (https://crates.io/crates/migrant). TOML config file generated and modified from `migrant init`. Database connection parameters should be passed in though environment variables, hence the '.env.sample'.