forked from quarck/CalendarNotification
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSchema.tsx
More file actions
66 lines (61 loc) · 1.72 KB
/
Schema.tsx
File metadata and controls
66 lines (61 loc) · 1.72 KB
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
// import { column, Schema, Table } from '@powersync/web';
import { column, Schema, Table } from '@powersync/react-native';
const eventsV9 = new Table(
{
// id column (text) is automatically included
cid: column.integer,
altm: column.integer,
nid: column.integer,
ttl: column.text,
s1: column.text,
estart: column.integer,
eend: column.integer,
istart: column.integer,
iend: column.integer,
loc: column.text,
snz: column.integer,
ls: column.integer,
dsts: column.integer,
clr: column.integer,
rep: column.integer,
alld: column.integer,
ogn: column.integer,
fsn: column.integer,
attsts: column.integer,
oattsts: column.integer,
i1: column.integer,
i2: column.integer,
i3: column.integer,
i4: column.integer,
i5: column.integer,
i6: column.integer,
i7: column.integer,
i8: column.integer,
s2: column.text
},
{ indexes: {} }
);
const reschedule_confirmations = new Table(
{
// id column (text) is automatically included
event_id: column.integer,
calendar_id: column.integer,
original_instance_start_time: column.integer,
title: column.text,
new_instance_start_time: column.integer,
// 0 past, 1 future
// https://docs.powersync.com/usage/sync-rules/types#postgres-type-mapping
// to quote the powersync docs:
// "There is no dedicated boolean data type. Boolean values are represented as 1 (true) or 0 (false)."
is_in_future: column.integer,
meta: column.text,
created_at: column.text,
updated_at: column.text
},
{ indexes: {} }
);
export const AppSchema = new Schema({
eventsV9,
reschedule_confirmations
});
export type Database = (typeof AppSchema)['types'];