mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2026-03-03 07:00:51 +01:00
Add DB migrations and run them on startup
Enable sqlx "migrate" feature and add SQL migrations to create the database schema: pg_trgm extension, sources, genres, authors, sequences, books, junction tables, annotations, and supporting indexes
This commit is contained in:
5
migrations/20260116092203_create_sources_table.sql
Normal file
5
migrations/20260116092203_create_sources_table.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Create sources table
|
||||
CREATE TABLE IF NOT EXISTS sources (
|
||||
id SMALLSERIAL PRIMARY KEY,
|
||||
name VARCHAR(32) NOT NULL UNIQUE
|
||||
);
|
||||
Reference in New Issue
Block a user