Skip to content

Commit a5dc13c

Browse files
authored
Merge pull request #1377 from ryanleecode/fix/postgres-adapter-schema-check
fix: postgres-adapter - remove nonsensical schema check
2 parents 2b6c6a9 + cf02297 commit a5dc13c

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

packages/adapter-postgres/src/index.ts

+5-15
Original file line numberDiff line numberDiff line change
@@ -210,21 +210,11 @@ export class PostgresDatabaseAdapter
210210
await client.query("SET app.use_gaianet_embedding = 'false'");
211211
}
212212

213-
// Check if schema already exists (check for a core table)
214-
const { rows } = await client.query(`
215-
SELECT EXISTS (
216-
SELECT FROM information_schema.tables
217-
WHERE table_name = 'rooms'
218-
);
219-
`);
220-
221-
if (!rows[0].exists) {
222-
const schema = fs.readFileSync(
223-
path.resolve(__dirname, "../schema.sql"),
224-
"utf8"
225-
);
226-
await client.query(schema);
227-
}
213+
const schema = fs.readFileSync(
214+
path.resolve(__dirname, "../schema.sql"),
215+
"utf8"
216+
);
217+
await client.query(schema);
228218

229219
await client.query("COMMIT");
230220
} catch (error) {

0 commit comments

Comments
 (0)