feat(schema): 005 — tags, entity_tags, entity_links, attachments
This commit is contained in:
16
tests/db/migration_005.test.js
Normal file
16
tests/db/migration_005.test.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, it, expect, beforeAll } from 'vitest';
|
||||
import { resetDb, withClient } from '../helpers/db.js';
|
||||
import { migrateUp } from '../../lib/db/migrate.js';
|
||||
|
||||
describe('migration 005 — cross', () => {
|
||||
beforeAll(async () => { await resetDb(); await migrateUp(); });
|
||||
|
||||
it('creates tags, entity_tags, entity_links, attachments', async () => {
|
||||
await withClient(async (c) => {
|
||||
for (const t of ['tags','entity_tags','entity_links','attachments']) {
|
||||
const { rows } = await c.query(`SELECT to_regclass('public.' || $1) AS t;`, [t]);
|
||||
expect(rows[0].t).toBe(t);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user