Created
November 14, 2022 19:48
-
-
Save colinfwren/a1a3d01c0466f7bf00af101fc459469e to your computer and use it in GitHub Desktop.
Database Setup script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import postgresql | |
db = postgresql.open('pq://user:pass@localhost:5434/db') | |
db.execute("create extension if not exists cube;") | |
db.execute("drop table if exists vectors") | |
db.execute("create table vectors (id serial, file varchar, image_id numeric, vec_low cube, vec_high cube);") | |
db.execute("create index vectors_vec_idx on vectors (vec_low, vec_high);") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment