File: sqlite.sh

package info (click to toggle)
golang-github-rubenv-sql-migrate 0.0~git20191213.0633851-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 292 kB
  • sloc: sh: 42; makefile: 4; sql: 4
file content (17 lines) | stat: -rwxr-xr-x 373 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Tweak PATH for Travis
export PATH=$PATH:$HOME/gopath/bin

OPTIONS="-config=test-integration/dbconfig.yml -env sqlite"

set -ex

sql-migrate status $OPTIONS
sql-migrate up $OPTIONS
sql-migrate down $OPTIONS
sql-migrate redo $OPTIONS
sql-migrate status $OPTIONS

# Should have used the custom migrations table
sqlite3 test.db "SELECT COUNT(*) FROM migrations"