feat: add fileHash column to files schema
Update files database schema and test suite to support fileHash property. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3d2500ed7f
commit
22c2133b24
@@ -13,6 +13,7 @@ export const files = pgTable('files', {
|
||||
sizeBytes: bigint('size_bytes', { mode: 'number' }).notNull(),
|
||||
fileType: text('file_type').notNull(),
|
||||
uploaderId: bigint('uploader_id', { mode: 'number' }).notNull(),
|
||||
fileHash: text('file_hash'),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
||||
});
|
||||
|
||||
@@ -25,6 +25,7 @@ describe('Database Layer', () => {
|
||||
expect(files.sizeBytes).toBeDefined();
|
||||
expect(files.fileType).toBeDefined();
|
||||
expect(files.uploaderId).toBeDefined();
|
||||
expect(files.fileHash).toBeDefined();
|
||||
expect(files.createdAt).toBeDefined();
|
||||
expect(files.updatedAt).toBeDefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user