2019-01-15 14:18:04 +00:00
|
|
|
import { appSchema, tableSchema } from '@nozbe/watermelondb'
|
|
|
|
|
|
|
|
export default appSchema({
|
|
|
|
version: 1,
|
|
|
|
tables: [
|
2019-01-15 18:32:55 +00:00
|
|
|
tableSchema({
|
|
|
|
name: 'lp_events',
|
|
|
|
columns: [
|
2019-01-19 18:12:36 +00:00
|
|
|
{ name: 'event_id', type: 'string', isIndexed: true },
|
2019-01-15 18:32:55 +00:00
|
|
|
{ name: 'address', type: 'string' },
|
2019-01-19 18:12:36 +00:00
|
|
|
{ name: 'event', type: 'string', isIndexed: true },
|
2019-01-15 22:29:02 +00:00
|
|
|
{ name: 'block_number', type: 'number', isIndexed: true },
|
2019-01-19 18:12:36 +00:00
|
|
|
{ name : 'return_values', type: 'string', isOptional: true }
|
2019-01-15 18:32:55 +00:00
|
|
|
]
|
2019-01-25 17:18:44 +00:00
|
|
|
}),
|
|
|
|
tableSchema({
|
|
|
|
name: 'vault_events',
|
|
|
|
columns: [
|
|
|
|
{ name: 'event_id', type: 'string', isIndexed: true },
|
|
|
|
{ name: 'address', type: 'string' },
|
|
|
|
{ name: 'event', type: 'string', isIndexed: true },
|
|
|
|
{ name: 'block_number', type: 'number', isIndexed: true },
|
|
|
|
{ name : 'return_values', type: 'string', isOptional: true }
|
|
|
|
]
|
2019-01-16 20:50:49 +00:00
|
|
|
}),
|
|
|
|
tableSchema({
|
|
|
|
name: 'profiles',
|
|
|
|
columns: [
|
2019-01-19 01:51:48 +00:00
|
|
|
{ name: 'event_id', type: 'string' },
|
2019-01-16 20:50:49 +00:00
|
|
|
{ name: 'addr', type: 'string' },
|
|
|
|
{ name: 'canceled', type: 'boolean' },
|
|
|
|
{ name: 'commit_time', type: 'number' },
|
|
|
|
{ name: 'type', type: 'string' },
|
|
|
|
{ name: 'name', type: 'string' },
|
|
|
|
{ name: 'url', type: 'string' },
|
2019-02-05 18:41:17 +00:00
|
|
|
{ name: 'id_profile', type: 'number', isIndexed: true },
|
|
|
|
{ name: 'block_number', type: 'number', isIndexed: true }
|
2019-01-21 22:32:42 +00:00
|
|
|
]
|
|
|
|
}),
|
|
|
|
tableSchema({
|
|
|
|
name: 'pledges',
|
|
|
|
columns: [
|
2019-01-22 19:58:11 +00:00
|
|
|
{ name: 'pledge_id', type: 'number', isIndexed: true },
|
2019-01-21 22:32:42 +00:00
|
|
|
{ name: 'owner_id', type: 'number', isIndexed: true },
|
2019-01-22 19:39:25 +00:00
|
|
|
{ name: 'amount', type: 'string' },
|
2019-01-21 22:32:42 +00:00
|
|
|
{ name: 'token', type: 'string' },
|
|
|
|
{ name: 'commit_time', type: 'number' },
|
|
|
|
{ name: 'n_delegates', type: 'number' },
|
|
|
|
{ name: 'intended_project', type: 'number' },
|
|
|
|
{ name: 'pledge_state', type: 'number' },
|
2019-02-05 18:41:17 +00:00
|
|
|
{ name: 'profile_id', type: 'string', isIndexed: true },
|
|
|
|
{ name: 'block_number', type: 'number', isIndexed: true }
|
2019-01-16 20:50:49 +00:00
|
|
|
]
|
2019-01-15 18:32:55 +00:00
|
|
|
})
|
2019-01-15 14:18:04 +00:00
|
|
|
]
|
|
|
|
})
|