Skip to content

Commit eb1225f

Browse files
committed
feat: bump to pg18
1 parent 5519df4 commit eb1225f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Dockerfile.pgvector

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM ghcr.io/cloudnative-pg/postgresql:17
1+
FROM ghcr.io/cloudnative-pg/postgresql:18
22

33
USER root
44

55
RUN set -xe; \
66
apt-get update; \
77
apt-get install -y --no-install-recommends \
8-
"postgresql-17-pgvector" ; \
8+
"postgresql-18-pgvector" ; \
99
rm -fr /tmp/* ; \
1010
rm -rf /var/lib/apt/lists/*;
1111

init_db.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CREATE DATABASE lor_e;
44

55
CREATE EXTENSION vector;
66

7-
CREATE TABLE IF NOT EXISTS issues (
7+
CREATE TABLE issues (
88
id SERIAL PRIMARY KEY,
99
source_id VARCHAR NOT NULL UNIQUE,
1010
source VARCHAR NOT NULL,
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS issues (
2020
updated_at timestamp with time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
2121
);
2222

23-
CREATE TABLE IF NOT EXISTS comments (
23+
CREATE TABLE comments (
2424
id SERIAL PRIMARY KEY,
2525
source_id VARCHAR NOT NULL UNIQUE,
2626
issue_id INT NOT NULL REFERENCES issues(id) ON DELETE CASCADE,
@@ -30,13 +30,13 @@ CREATE TABLE IF NOT EXISTS comments (
3030
updated_at timestamp with time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
3131
);
3232

33-
CREATE INDEX IF NOT EXISTS issues_source_id_idx ON issues (source_id);
34-
CREATE INDEX IF NOT EXISTS comments_source_id_idx ON comments (source_id);
35-
CREATE INDEX IF NOT EXISTS issues_embedding_hnsw_idx ON issues USING hnsw (embedding halfvec_cosine_ops);
33+
CREATE INDEX issues_source_id_idx ON issues (source_id);
34+
CREATE INDEX comments_source_id_idx ON comments (source_id);
35+
CREATE INDEX issues_embedding_hnsw_idx ON issues USING hnsw (embedding halfvec_cosine_ops);
3636

3737
CREATE TYPE job_type AS ENUM ('embeddings_regeneration', 'issue_indexation');
3838

39-
CREATE TABLE IF NOT EXISTS jobs (
39+
CREATE TABLE jobs (
4040
id SERIAL PRIMARY KEY,
4141
job_type job_type NOT NULL,
4242
repository_full_name VARCHAR UNIQUE,
@@ -45,5 +45,5 @@ CREATE TABLE IF NOT EXISTS jobs (
4545
updated_at timestamp with time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
4646
);
4747

48-
CREATE INDEX IF NOT EXISTS jobs_repository_id_idx ON jobs (repository_id);
49-
CREATE UNIQUE INDEX IF NOT EXISTS jobs_type_embeddings_regeneration_idx ON jobs (job_type) WHERE job_type = 'embeddings_regeneration';
48+
CREATE INDEX jobs_repository_id_idx ON jobs (repository_id);
49+
CREATE UNIQUE INDEX jobs_type_embeddings_regeneration_idx ON jobs (job_type) WHERE job_type = 'embeddings_regeneration';

0 commit comments

Comments
 (0)