Skip to content

Commit 5e858ee

Browse files
committed
fix(coderd/database): fix down migration and add fixture
1 parent 1339f8d commit 5e858ee

File tree

4 files changed

+9
-34
lines changed

4 files changed

+9
-34
lines changed

coderd/database/migrations/000318_chat.down.sql

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DROP TABLE IF EXISTS chat_messages;
2+
3+
DROP TABLE IF EXISTS chats;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
INSERT INTO chats (id, owner_id, created_at, updated_at, title) VALUES
2+
('00000000-0000-0000-0000-000000000001', '0ed9befc-4911-4ccf-a8e2-559bf72daa94', '2023-10-01 12:00:00+00', '2023-10-01 12:00:00+00', 'Test Chat 1');
3+
4+
INSERT INTO chat_messages (id, chat_id, created_at, model, provider, content) VALUES
5+
(1, '00000000-0000-0000-0000-000000000001', '2023-10-01 12:00:00+00', 'annie-oakley', 'cowboy-coder', '{"role":"user","content":"Hello"}'),
6+
(2, '00000000-0000-0000-0000-000000000001', '2023-10-01 12:01:00+00', 'annie-oakley', 'cowboy-coder', '{"role":"assistant","content":"Howdy pardner! What can I do ya for?"}');

0 commit comments

Comments
 (0)