migrate mobile with new endpoints
This commit is contained in:
@@ -11,20 +11,22 @@ export const files = sqliteTable(
|
||||
source: text('source').notNull().default('cloud'),
|
||||
localUri: text('local_uri'),
|
||||
syncStatus: text('sync_status').notNull().default('cloud'),
|
||||
parentFileId: text('parent_file_id'),
|
||||
parentResourceId: text('parent_resource_id'),
|
||||
isFolder: integer('is_folder').notNull().default(0),
|
||||
ocrText: text('ocr_text'),
|
||||
thumbnailUrl: text('thumbnail_url'),
|
||||
ownerId: text('owner_id'),
|
||||
createdAt: text('created_at').notNull(),
|
||||
updatedAt: text('updated_at').notNull(),
|
||||
lastSyncedAt: text('last_synced_at'),
|
||||
},
|
||||
(t) => [
|
||||
index('idx_files_backend_id').on(t.backendId),
|
||||
index('idx_files_parent_id').on(t.parentFileId),
|
||||
index('idx_files_parent_resource_id').on(t.parentResourceId),
|
||||
index('idx_files_source').on(t.source),
|
||||
index('idx_files_is_folder').on(t.isFolder),
|
||||
index('idx_files_sync_status').on(t.syncStatus),
|
||||
index('idx_files_owner_id').on(t.ownerId),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -36,7 +38,6 @@ export const fileTags = sqliteTable(
|
||||
.notNull()
|
||||
.references(() => files.id, { onDelete: 'cascade' }),
|
||||
tagName: text('tag_name').notNull(),
|
||||
tagType: text('tag_type').notNull().default('none'),
|
||||
},
|
||||
(t) => [index('idx_file_tags_file_id').on(t.fileId)],
|
||||
);
|
||||
@@ -45,3 +46,11 @@ export const deletedFiles = sqliteTable('deleted_files', {
|
||||
id: text('id').primaryKey(),
|
||||
deletedAt: text('deleted_at').notNull(),
|
||||
});
|
||||
|
||||
export const deviceInfo = sqliteTable('device_info', {
|
||||
id: text('id').primaryKey(),
|
||||
serverId: text('server_id'),
|
||||
deviceName: text('device_name').notNull().default(''),
|
||||
platform: text('platform').notNull().default(''),
|
||||
registeredAt: text('registered_at'),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user