Skip to content

Commit

Permalink
update database schema to include description
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Oct 14, 2024
1 parent 91d5737 commit 6f08329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions backend/sql-scripts/1-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CREATE TABLE bee_schema.repos
user_id BIGINT NOT NULL,
latest_commit_sha VARCHAR(40) NOT NULL,
latest_commit_pushed_at TIMESTAMP WITH TIME ZONE NOT NULL,
description VARCHAR(2048) NOT NULL,
FOREIGN KEY (user_id) REFERENCES bee_schema.users (id) ON DELETE CASCADE
);

Expand Down
7 changes: 3 additions & 4 deletions backend/sql-scripts/100-seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ SET search_path TO bee_schema, public;
INSERT INTO bee_schema.users (id, username, access_token, refresh_token)
VALUES (-100, 'bee-ci-system', 'access_token', 'refresh_token');

INSERT INTO bee_schema.repos (id, name, user_id)
VALUES (-200, 'example-using-beeci', -100),
(-201, 'example-using-beeci', -100),
(-202, 'example-using-beeci', -100);
INSERT INTO bee_schema.repos (id, name, user_id, latest_commit_sha, latest_commit_pushed_at, description)
VALUES (-200, 'example-using-beeci', -100, 'abc123def456ghi789', '2005-04-02 21:37:00', 'random desc 1'),
(-201, 'example', -100, 'abc123def456ghi789', '2005-04-02 21:37:00', 'example repo!!! description');

INSERT INTO bee_schema.builds (repo_id, commit_sha, commit_message, installation_id, status)
VALUES (-200, '5ac1545229da7f0af6dfbae68950198866186a07', 'c_alpha commit 1', 0, 'queued');
Expand Down

0 comments on commit 6f08329

Please sign in to comment.