-
Notifications
You must be signed in to change notification settings - Fork 7
/
migrations.go
191 lines (166 loc) · 13.4 KB
/
migrations.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"strings"
)
func bindata_read(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
gz.Close()
if err != nil {
return nil, fmt.Errorf("Read %q: %v", name, err)
}
return buf.Bytes(), nil
}
var _migrations_pg_0001_create_func_ext_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func migrations_pg_0001_create_func_ext_down_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0001_create_func_ext_down_sql,
"migrations/pg/0001_create_func_ext.down.sql",
)
}
var _migrations_pg_0001_create_func_ext_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x90\x4f\x73\xda\x30\x10\xc5\xef\xfa\x14\xef\x40\x07\x98\x92\x99\xd0\xff\xc5\xe5\x60\xcc\x42\xdc\xba\x32\xb5\x45\x42\x7a\x61\x8c\x51\x8c\x5a\x63\x3b\x96\xdc\x86\x4c\x3e\x7c\x47\xa6\x94\xde\x72\xdb\xd5\x7b\xbb\xef\xa7\xbd\xb8\x40\x5a\xcb\xc4\x48\xc8\x07\x23\x0b\xad\xca\x42\x33\x2f\x22\x57\x10\x68\x25\x88\xc7\x7e\xc8\xe1\xcf\xc0\x43\x01\x5a\xf9\xb1\x88\x51\x65\x69\x7d\xa8\x4c\xe9\x3c\x6f\x5c\x9b\x3a\xdb\x3b\x8c\x9d\x63\x1a\xb5\xc5\x5d\x53\xa4\x46\x95\xc5\x69\x3e\x8c\x10\xd1\x22\x70\x3d\xc2\x6c\xc9\x3d\x61\x37\x65\xb2\x90\x75\x62\xe4\xba\x51\xdb\x9e\x56\x8f\x12\x3e\x17\x7d\x44\x24\x96\x11\x8f\x21\x68\x25\xe0\xc6\xe8\x74\xd8\x94\xbc\xc0\x8d\x88\x01\xe9\x2e\xa9\x93\xd4\xc8\x5a\x1f\xf5\xd1\x18\x5d\x77\xe2\x4d\x69\x36\xbf\xf2\x3f\x7f\x09\xbe\xf2\x70\xf1\x2d\x8a\xc5\xf2\xfa\x66\x75\xfb\x3d\xd9\xa4\x5b\x79\x97\xed\xd4\x8f\x9f\xf9\xbe\x28\xab\xfb\x5a\x9b\xe6\xd7\xef\x87\xc3\xe3\xe5\xf0\xd5\xeb\x37\x6f\xdf\xbd\xff\xf0\xb1\xeb\x30\x60\x73\x30\x52\x63\x72\x2b\xc8\xb5\x2b\x33\x59\xac\xeb\xa4\xd8\x96\xfb\x75\xab\xb4\x74\x7d\x6b\xcc\x2d\xa3\xb5\xe4\xb2\xc8\xcc\xae\x77\xe6\x69\x65\x75\x92\x2f\x6d\x57\x36\xa6\x6a\xcc\x19\xb4\xeb\xb0\x09\xcd\x7d\xce\x80\x9b\x2b\x3f\x20\x28\x7c\x42\xfb\xf1\x20\x0c\x17\x0c\xf8\x37\x32\x1a\x9f\xaa\xa7\x27\xe8\x66\xa3\x4d\xfd\x5f\xd4\x00\x99\x34\x2d\x59\xaf\xc5\x1b\x40\xf5\xf1\x02\x39\x5e\x62\x38\xc0\xb0\x25\xb1\x2c\xa3\x31\x94\x7d\xb3\x3d\xf1\x69\x9b\x62\xeb\xe3\x85\xff\x26\x38\x8c\xf8\xd4\x61\x9d\x0e\x02\x97\xcf\x97\xee\x9c\x50\xe5\x55\xa6\xef\x73\x5c\x87\x81\x2b\xfc\x80\x1c\xf6\x27\x00\x00\xff\xff\x1f\xf4\xdb\x5f\x44\x02\x00\x00")
func migrations_pg_0001_create_func_ext_up_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0001_create_func_ext_up_sql,
"migrations/pg/0001_create_func_ext.up.sql",
)
}
var _migrations_pg_0002_create_tables_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x29\xca\x2f\x50\x28\x49\x4c\xca\x49\x55\xc8\x4c\x53\x48\xad\xc8\x2c\x2e\x29\x56\x48\xcb\xcc\x49\x2d\x2a\xb6\xe6\xc2\x2e\x99\x5f\x94\x8b\x4b\x2e\x25\x3f\xb9\x34\x37\x35\xaf\x04\xa7\xde\xcc\x9c\xcc\xbc\xf4\x62\x6b\x2e\x40\x00\x00\x00\xff\xff\x7e\x5e\x9f\x31\x77\x00\x00\x00")
func migrations_pg_0002_create_tables_down_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0002_create_tables_down_sql,
"migrations/pg/0002_create_tables.down.sql",
)
}
var _migrations_pg_0002_create_tables_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x54\x4f\x8f\x9b\x3e\x10\x3d\xe3\x4f\x31\xc7\x44\x4a\x7e\x87\x9f\x7a\xa8\x9a\x13\x49\xbc\x15\x2a\x81\x2d\x31\x52\xa3\xaa\x42\x5e\x33\xa4\x56\x0c\xde\x62\xd3\x6a\xfb\xe9\x2b\xfe\x26\x01\x56\xea\x1e\x7a\x64\xde\x0c\x9e\xf7\xde\xcc\xac\xd7\x90\x49\x25\x8b\xb3\x01\xcb\x9f\x14\x7e\x00\x63\x75\x89\xa6\x8f\xfe\x47\x76\x11\x75\x19\x05\xe6\x6e\x7d\x3a\xe4\x2e\x88\x23\x53\x60\xf4\x0b\x83\xc7\xc8\x3b\xb8\xd1\x09\x3e\xd1\x13\xec\xe9\x83\x1b\xfb\x0c\xce\x58\x60\xc9\x2d\x26\x95\x4c\x17\xff\xbf\x5b\xae\x08\x01\x10\x25\x72\x8b\x29\x30\xef\x40\x8f\xcc\x3d\x3c\x42\x10\x32\x08\x62\xdf\x1f\xea\x0a\xfd\x6b\xb1\x5c\x11\x80\xea\x39\xfd\xcb\x5c\x27\x93\x0a\xcb\xb6\x95\x3e\xa7\xfe\x03\x17\x02\x8d\x91\xba\x68\xa1\x38\xf0\x3e\xc7\xf4\x2e\x43\xc8\xcb\xb8\xcc\xe1\x4a\x25\x42\x5e\x4c\x03\x7c\xfd\x76\x0b\x61\x7a\xe6\x65\x52\x95\x6a\xfa\x56\x0b\x59\x99\xe3\x4c\xc3\x2b\xe2\x94\xa8\xb8\x1d\x5a\xb9\x01\x32\x5d\xe6\x89\x7d\x79\xc6\x09\x92\x6a\x91\x08\x5d\x15\x16\xb6\xde\x47\x2f\x60\x2b\xe2\x58\x6d\xb9\x4a\x8c\xfc\x8d\x09\x1a\xdb\x54\xd4\x8f\x9b\x97\xfc\x49\xab\xee\xb3\x21\xd0\x46\x7a\x0e\x64\xb9\x21\x64\xbd\x86\x54\x8b\x2a\xc7\xc2\x8e\x8d\x46\x2e\xbe\x0f\x20\xe8\x0c\x78\xe7\xf2\xc8\xfa\x6b\xfd\xbf\x35\xdf\x31\xf8\xa3\x23\x3d\x16\x64\x56\xa9\x57\x7d\x69\x4a\x52\x34\x62\x0a\x70\xcb\x61\x7b\x62\xd4\xbd\x8d\x8e\x94\x6d\x26\x4b\x16\xe7\xa4\xe7\x1a\xd1\x07\x1a\xd1\x60\x47\x8f\xfd\x1a\xf4\xd2\xd6\x36\x4e\xf6\xa7\x8e\x8d\xb7\xa7\xc9\x7b\x8b\x7c\x9d\x7a\xaf\xce\x49\x07\xcd\xb1\xac\x57\xc0\xca\x9f\x08\xdb\x30\xf4\xa9\x1b\x4c\x05\xcf\xb8\x32\x38\x70\xa8\xd7\x68\xe6\x08\x60\x39\x73\x03\xea\xcc\xb7\xd0\x78\xdf\xd2\xb8\x1b\xd5\xd9\x05\x04\x28\x78\x3e\xc3\xd2\x48\x71\x1d\x78\x79\x63\x6b\xd7\xbe\xeb\x33\x1a\xdd\xf7\xd7\x86\x76\xa1\x1f\x1f\x82\xf6\xaf\xfb\x28\xbc\x8e\xdd\x86\xcc\xd5\xec\xf7\xb0\x0b\x83\x23\x8b\xdc\x7a\xfc\xaa\xfa\x16\xf4\xa7\x63\x21\xe4\x65\xb9\x21\x7f\x02\x00\x00\xff\xff\x72\x45\xd5\xca\x31\x05\x00\x00")
func migrations_pg_0002_create_tables_up_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0002_create_tables_up_sql,
"migrations/pg/0002_create_tables.up.sql",
)
}
var _migrations_pg_0003_create_indexes_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\xd1\xc1\x0d\xc3\x20\x0c\x05\xd0\x7b\xa7\x60\x8f\x0e\x83\xa8\x6d\x52\xab\x80\x23\x9b\x4a\x64\xfb\x2a\x89\x94\x5e\x22\xe0\xfe\xf4\xf9\x7c\xa3\xca\xea\xb8\x20\x35\xc7\xd1\x51\x63\xab\xe6\x22\x27\x2e\x8b\x79\x50\x0a\x95\xd0\x33\xb6\xe7\xa3\x2b\x09\x97\xa0\xbe\x72\xa6\x09\x6c\x5b\x7e\x49\x9a\x80\xc0\x9f\x09\x15\x00\xc8\x8c\xa5\x4c\xd8\x28\x9a\x4f\x76\xef\x50\xe0\x9b\xa9\x54\xf3\x75\x5b\x7b\x7f\xf9\xc3\x33\xda\x33\xf6\x72\x23\x27\x52\xbb\x50\xcf\xcc\xac\xb3\xbb\xe1\x38\x3b\x2a\x61\x74\x91\xe3\x49\x0a\x0a\xef\x6e\x7f\xd1\x3c\xaa\x7f\x90\x6b\xb6\x5f\x00\x00\x00\xff\xff\x2d\xab\x5c\x3e\x59\x02\x00\x00")
func migrations_pg_0003_create_indexes_down_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0003_create_indexes_down_sql,
"migrations/pg/0003_create_indexes.down.sql",
)
}
var _migrations_pg_0003_create_indexes_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x92\x31\x6f\xf2\x30\x10\x86\xf7\xfc\x8a\xdb\x48\x86\xfc\x82\x4c\x9f\x20\xc3\xb7\x50\xa9\xed\xd0\xcd\x32\xf6\x91\x9e\x20\x36\xb2\x8d\x04\x12\x3f\xbe\xb2\x4d\x42\x52\xc7\xe9\x84\x38\x3f\xcf\xf9\x95\xf3\xd6\x35\x1c\xe9\x4c\xaa\xb3\xe0\xf8\xe1\x8c\x40\x4a\xe2\x0d\x6d\xb1\x7d\x6f\xff\x7d\xb6\xf0\x7f\xbf\x6b\xbf\x06\x84\x09\x83\xdc\xa1\x64\x24\x6f\xf0\xb6\x1f\xcd\xf2\x39\x87\x5d\xfb\xb1\xad\x9a\x65\x17\x65\xc7\x0d\x73\xd4\x63\xa2\xbf\x8e\x56\x37\xd8\x7b\x7f\xd0\xe7\xc4\x8e\xe3\x9c\x24\xe8\x94\xc6\xa5\x53\x0e\xe7\x42\xa0\xb5\xa4\x55\x22\x8d\x27\x39\xf5\xa8\x4d\x9f\x58\x61\xe8\xee\x17\xac\x9a\xa2\xae\x41\x6a\x71\xed\x51\xb9\xd5\xd7\x1e\xa1\x20\x0e\x2b\x5f\x6a\x29\xb5\x18\x76\x66\xc4\x78\x3f\x23\xb9\x60\x8f\x67\x55\x53\xf8\x4c\x3e\xe2\xfa\xd7\xf7\xc0\x64\x57\x14\xca\xb0\x60\x01\x9c\x86\x7e\xa2\xd3\x57\x28\x62\xe5\xd0\xfc\xd5\x38\x34\xb3\x4b\xa3\xb2\x74\x6b\x44\x93\x76\x04\x3c\x5b\x0e\xaf\xcc\xbb\x11\xf8\xe5\x6a\x78\x58\xf1\x59\x73\x03\xed\x67\xb9\x38\xc8\x8d\xf8\xfe\x25\x5c\x2d\xa9\x0e\x3a\x52\x50\x06\x17\x1e\x0f\xd8\xc0\xc6\xff\x08\x3a\x4d\xfe\x3d\x63\x7b\x94\x39\xd3\xf5\x4c\x5f\x6c\xd5\x14\x3f\x01\x00\x00\xff\xff\x23\x30\xe4\x28\xae\x03\x00\x00")
func migrations_pg_0003_create_indexes_up_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0003_create_indexes_up_sql,
"migrations/pg/0003_create_indexes.up.sql",
)
}
var _migrations_pg_0004_insert_forms_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x71\xf5\x71\x0d\x71\x55\x70\x0b\xf2\xf7\x55\x48\xcb\x2f\xca\x2d\xb6\xe6\x02\x04\x00\x00\xff\xff\x83\x68\x3b\x59\x13\x00\x00\x00")
func migrations_pg_0004_insert_forms_down_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0004_insert_forms_down_sql,
"migrations/pg/0004_insert_forms.down.sql",
)
}
var _migrations_pg_0004_insert_forms_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xd1\x6b\xdb\x30\x10\xc6\xdf\xfb\x57\xdc\x5b\x5a\x70\x60\xa1\xdb\x28\xec\x29\xb4\xc9\x08\x2b\x19\xad\xd3\xbd\x0e\x55\x3e\xdb\x07\xb2\xa4\xdd\x9d\xb2\x65\x7f\xfd\x90\xd3\x6e\x29\x75\x3c\x32\xf6\x66\x8b\xef\x7e\x9f\x74\x77\xdf\x6a\x5d\x2e\xee\x37\xb0\x5a\x6f\x3e\x43\x1d\xb8\x13\x38\xa7\xaa\xe8\x3f\xbf\xea\x2e\xe2\xd3\x67\x85\x62\x0b\x30\x56\x69\x8b\x17\xf0\x65\x7e\xfb\xb0\x28\xcf\xce\x6f\x16\xcb\xf9\xc3\xed\xa6\x80\xc9\xe5\xa4\x80\xc9\xca\x93\x92\x71\x20\x6a\x14\x3b\xf4\x0a\xa1\x86\x47\xf4\x58\x93\xcd\xe7\xe1\xbb\x47\x96\x96\x62\x3e\x17\xb4\x89\x49\x09\x65\x52\x80\x72\xc2\x8b\xe2\x10\xf8\x36\x03\xcb\x43\x90\x6d\x8d\x6f\x50\x80\xfc\xbf\x32\xdf\x4f\x3f\x65\xea\x3d\xc6\xc0\x3d\xb2\x0e\x8c\xd4\x78\x88\x4c\x5b\xa3\x08\x24\x92\x90\x07\x6b\xaf\xf6\xb5\xd7\x89\x39\xdf\x87\x7b\xc6\xa0\x72\xf6\x66\x2f\x9d\x7b\x9f\x8c\xfb\x8b\xf2\x2e\x2b\xef\x92\x61\x45\x76\xbb\x31\x71\x79\x0d\xb3\xcb\xe5\x90\x3c\xbf\x84\xbc\x28\x69\x52\x0a\xde\x38\x20\xbf\x45\xd1\xbe\x71\x6d\x70\x15\xf9\x66\xb8\x21\x3d\xf3\xe6\x65\x4f\x8c\xfd\x96\x48\x28\x93\xf6\xbf\x79\xe4\x47\x3b\xde\x05\x46\xd0\xd6\x78\x78\x07\x11\xd9\xa2\x1f\xb9\xfd\xc7\x51\xa7\x68\x44\xfe\x87\xd5\x72\x3a\x7b\xb5\x3b\x8c\x0d\x89\xb2\x79\xf6\xfa\xb3\x28\xf0\xb8\x03\xf3\x7b\x11\x46\x16\xa0\x3c\x09\x7b\x04\xd1\xc7\xa4\x6c\x03\xeb\x34\xc7\xea\x65\x52\x4e\xa6\xbd\xce\xc8\xc8\x3b\x19\x9d\x51\xac\x40\x03\x74\xc8\x0d\x32\x04\x3e\x1c\xc1\x11\x8f\xab\x53\x3c\x8c\x40\x34\x4f\xc3\xf5\x80\x5d\x74\x61\x87\xcf\x13\x55\x88\xce\x1c\xb1\xe9\x77\xb0\x8c\x98\xa7\x4e\x3f\xb1\x82\x8a\xc4\xba\x20\x89\x71\x2c\x13\x7d\xd9\x3a\x28\x59\xcc\x9e\xf8\x03\xbb\x98\xdd\x6b\x64\xf2\xcd\x70\x0f\x3f\x9c\xfd\x0a\x00\x00\xff\xff\xae\xaa\x70\xe1\xf3\x04\x00\x00")
func migrations_pg_0004_insert_forms_up_sql() ([]byte, error) {
return bindata_read(
_migrations_pg_0004_insert_forms_up_sql,
"migrations/pg/0004_insert_forms.up.sql",
)
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
return f()
}
return nil, fmt.Errorf("Asset %s not found", name)
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() ([]byte, error){
"migrations/pg/0001_create_func_ext.down.sql": migrations_pg_0001_create_func_ext_down_sql,
"migrations/pg/0001_create_func_ext.up.sql": migrations_pg_0001_create_func_ext_up_sql,
"migrations/pg/0002_create_tables.down.sql": migrations_pg_0002_create_tables_down_sql,
"migrations/pg/0002_create_tables.up.sql": migrations_pg_0002_create_tables_up_sql,
"migrations/pg/0003_create_indexes.down.sql": migrations_pg_0003_create_indexes_down_sql,
"migrations/pg/0003_create_indexes.up.sql": migrations_pg_0003_create_indexes_up_sql,
"migrations/pg/0004_insert_forms.down.sql": migrations_pg_0004_insert_forms_down_sql,
"migrations/pg/0004_insert_forms.up.sql": migrations_pg_0004_insert_forms_up_sql,
}
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
node := _bintree
if len(name) != 0 {
cannonicalName := strings.Replace(name, "\\", "/", -1)
pathList := strings.Split(cannonicalName, "/")
for _, p := range pathList {
node = node.Children[p]
if node == nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
}
}
if node.Func != nil {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
}
return rv, nil
}
type _bintree_t struct {
Func func() ([]byte, error)
Children map[string]*_bintree_t
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"migrations": &_bintree_t{nil, map[string]*_bintree_t{
"pg": &_bintree_t{nil, map[string]*_bintree_t{
"0001_create_func_ext.down.sql": &_bintree_t{migrations_pg_0001_create_func_ext_down_sql, map[string]*_bintree_t{
}},
"0001_create_func_ext.up.sql": &_bintree_t{migrations_pg_0001_create_func_ext_up_sql, map[string]*_bintree_t{
}},
"0002_create_tables.down.sql": &_bintree_t{migrations_pg_0002_create_tables_down_sql, map[string]*_bintree_t{
}},
"0002_create_tables.up.sql": &_bintree_t{migrations_pg_0002_create_tables_up_sql, map[string]*_bintree_t{
}},
"0003_create_indexes.down.sql": &_bintree_t{migrations_pg_0003_create_indexes_down_sql, map[string]*_bintree_t{
}},
"0003_create_indexes.up.sql": &_bintree_t{migrations_pg_0003_create_indexes_up_sql, map[string]*_bintree_t{
}},
"0004_insert_forms.down.sql": &_bintree_t{migrations_pg_0004_insert_forms_down_sql, map[string]*_bintree_t{
}},
"0004_insert_forms.up.sql": &_bintree_t{migrations_pg_0004_insert_forms_up_sql, map[string]*_bintree_t{
}},
}},
}},
}}