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