Skip to content
File

Blob: drizzle/d1/meta/0001_snapshot.json

json347 lines
1{
2 "version": "6",
3 "dialect": "sqlite",
4 "id": "fd245a82-8e7b-4bd4-bccd-226948048e29",
5 "prevId": "fbd34856-e900-4347-a588-c3d8396f608a",
6 "tables": {
7 "audit_events": {
8 "name": "audit_events",
9 "columns": {
10 "id": {
11 "name": "id",
12 "type": "text",
13 "primaryKey": true,
14 "notNull": true,
15 "autoincrement": false
16 },
17 "subject_id": {
18 "name": "subject_id",
19 "type": "text",
20 "primaryKey": false,
21 "notNull": false,
22 "autoincrement": false
23 },
24 "event_type": {
25 "name": "event_type",
26 "type": "text",
27 "primaryKey": false,
28 "notNull": true,
29 "autoincrement": false
30 },
31 "actor_subject_id": {
32 "name": "actor_subject_id",
33 "type": "text",
34 "primaryKey": false,
35 "notNull": false,
36 "autoincrement": false
37 },
38 "ip_hash": {
39 "name": "ip_hash",
40 "type": "text",
41 "primaryKey": false,
42 "notNull": false,
43 "autoincrement": false
44 },
45 "user_agent_hash": {
46 "name": "user_agent_hash",
47 "type": "text",
48 "primaryKey": false,
49 "notNull": false,
50 "autoincrement": false
51 },
52 "created_at_ms": {
53 "name": "created_at_ms",
54 "type": "integer",
55 "primaryKey": false,
56 "notNull": true,
57 "autoincrement": false
58 },
59 "data_json": {
60 "name": "data_json",
61 "type": "text",
62 "primaryKey": false,
63 "notNull": true,
64 "autoincrement": false
65 }
66 },
67 "indexes": {
68 "audit_events_subject_created_idx": {
69 "name": "audit_events_subject_created_idx",
70 "columns": [
71 "subject_id",
72 "created_at_ms"
73 ],
74 "isUnique": false
75 },
76 "audit_events_type_created_idx": {
77 "name": "audit_events_type_created_idx",
78 "columns": [
79 "event_type",
80 "created_at_ms"
81 ],
82 "isUnique": false
83 },
84 "audit_events_actor_created_idx": {
85 "name": "audit_events_actor_created_idx",
86 "columns": [
87 "actor_subject_id",
88 "created_at_ms"
89 ],
90 "isUnique": false
91 }
92 },
93 "foreignKeys": {
94 "audit_events_subject_id_subjects_id_fk": {
95 "name": "audit_events_subject_id_subjects_id_fk",
96 "tableFrom": "audit_events",
97 "tableTo": "subjects",
98 "columnsFrom": [
99 "subject_id"
100 ],
101 "columnsTo": [
102 "id"
103 ],
104 "onDelete": "set null",
105 "onUpdate": "no action"
106 }
107 },
108 "compositePrimaryKeys": {},
109 "uniqueConstraints": {},
110 "checkConstraints": {}
111 },
112 "control_plane_meta": {
113 "name": "control_plane_meta",
114 "columns": {
115 "key": {
116 "name": "key",
117 "type": "text",
118 "primaryKey": true,
119 "notNull": true,
120 "autoincrement": false
121 },
122 "value": {
123 "name": "value",
124 "type": "text",
125 "primaryKey": false,
126 "notNull": true,
127 "autoincrement": false
128 },
129 "updated_at_ms": {
130 "name": "updated_at_ms",
131 "type": "integer",
132 "primaryKey": false,
133 "notNull": true,
134 "autoincrement": false
135 }
136 },
137 "indexes": {},
138 "foreignKeys": {},
139 "compositePrimaryKeys": {},
140 "uniqueConstraints": {},
141 "checkConstraints": {}
142 },
143 "pat_projections": {
144 "name": "pat_projections",
145 "columns": {
146 "id": {
147 "name": "id",
148 "type": "text",
149 "primaryKey": true,
150 "notNull": true,
151 "autoincrement": false
152 },
153 "subject_id": {
154 "name": "subject_id",
155 "type": "text",
156 "primaryKey": false,
157 "notNull": true,
158 "autoincrement": false
159 },
160 "name": {
161 "name": "name",
162 "type": "text",
163 "primaryKey": false,
164 "notNull": true,
165 "autoincrement": false
166 },
167 "scopes_json": {
168 "name": "scopes_json",
169 "type": "text",
170 "primaryKey": false,
171 "notNull": true,
172 "autoincrement": false
173 },
174 "created_at_ms": {
175 "name": "created_at_ms",
176 "type": "integer",
177 "primaryKey": false,
178 "notNull": true,
179 "autoincrement": false
180 },
181 "expires_at_ms": {
182 "name": "expires_at_ms",
183 "type": "integer",
184 "primaryKey": false,
185 "notNull": false,
186 "autoincrement": false
187 },
188 "revoked_at_ms": {
189 "name": "revoked_at_ms",
190 "type": "integer",
191 "primaryKey": false,
192 "notNull": false,
193 "autoincrement": false
194 },
195 "last_used_at_ms": {
196 "name": "last_used_at_ms",
197 "type": "integer",
198 "primaryKey": false,
199 "notNull": false,
200 "autoincrement": false
201 }
202 },
203 "indexes": {
204 "pat_projections_subject_created_idx": {
205 "name": "pat_projections_subject_created_idx",
206 "columns": [
207 "subject_id",
208 "created_at_ms"
209 ],
210 "isUnique": false
211 },
212 "pat_projections_subject_active_idx": {
213 "name": "pat_projections_subject_active_idx",
214 "columns": [
215 "subject_id",
216 "revoked_at_ms",
217 "expires_at_ms"
218 ],
219 "isUnique": false
220 }
221 },
222 "foreignKeys": {
223 "pat_projections_subject_id_subjects_id_fk": {
224 "name": "pat_projections_subject_id_subjects_id_fk",
225 "tableFrom": "pat_projections",
226 "tableTo": "subjects",
227 "columnsFrom": [
228 "subject_id"
229 ],
230 "columnsTo": [
231 "id"
232 ],
233 "onDelete": "cascade",
234 "onUpdate": "no action"
235 }
236 },
237 "compositePrimaryKeys": {},
238 "uniqueConstraints": {},
239 "checkConstraints": {}
240 },
241 "subjects": {
242 "name": "subjects",
243 "columns": {
244 "id": {
245 "name": "id",
246 "type": "text",
247 "primaryKey": true,
248 "notNull": true,
249 "autoincrement": false
250 },
251 "storage_id": {
252 "name": "storage_id",
253 "type": "text",
254 "primaryKey": false,
255 "notNull": true,
256 "autoincrement": false
257 },
258 "host_label": {
259 "name": "host_label",
260 "type": "text",
261 "primaryKey": false,
262 "notNull": true,
263 "autoincrement": false
264 },
265 "email": {
266 "name": "email",
267 "type": "text",
268 "primaryKey": false,
269 "notNull": false,
270 "autoincrement": false
271 },
272 "display_name": {
273 "name": "display_name",
274 "type": "text",
275 "primaryKey": false,
276 "notNull": false,
277 "autoincrement": false
278 },
279 "created_at_ms": {
280 "name": "created_at_ms",
281 "type": "integer",
282 "primaryKey": false,
283 "notNull": true,
284 "autoincrement": false
285 },
286 "last_login_at_ms": {
287 "name": "last_login_at_ms",
288 "type": "integer",
289 "primaryKey": false,
290 "notNull": false,
291 "autoincrement": false
292 },
293 "host_rotated_at_ms": {
294 "name": "host_rotated_at_ms",
295 "type": "integer",
296 "primaryKey": false,
297 "notNull": false,
298 "autoincrement": false
299 },
300 "disabled_at_ms": {
301 "name": "disabled_at_ms",
302 "type": "integer",
303 "primaryKey": false,
304 "notNull": false,
305 "autoincrement": false
306 }
307 },
308 "indexes": {
309 "subjects_storage_id_unique": {
310 "name": "subjects_storage_id_unique",
311 "columns": [
312 "storage_id"
313 ],
314 "isUnique": true
315 },
316 "subjects_host_label_unique": {
317 "name": "subjects_host_label_unique",
318 "columns": [
319 "host_label"
320 ],
321 "isUnique": true
322 },
323 "subjects_disabled_idx": {
324 "name": "subjects_disabled_idx",
325 "columns": [
326 "disabled_at_ms"
327 ],
328 "isUnique": false
329 }
330 },
331 "foreignKeys": {},
332 "compositePrimaryKeys": {},
333 "uniqueConstraints": {},
334 "checkConstraints": {}
335 }
336 },
337 "views": {},
338 "enums": {},
339 "_meta": {
340 "schemas": {},
341 "tables": {},
342 "columns": {}
343 },
344 "internal": {
345 "indexes": {}
346 }
347}