- Add sqlx 0.8 (AnyPool, runtime-tokio, sqlite, postgres, migrate) - Create 6 migration files for both SQLite and PostgreSQL backends - Add server/db.rs: create_pool and run_migrations helpers - Add server/state.rs: AppState with LeptosOptions + AnyPool - Run migrations at server startup before accepting requests - Fix Port model: remove host_id (ports are now a global catalog) - Add HostPort join struct for the host_ports many-to-many table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 lines
308 B
SQL
8 lines
308 B
SQL
-- ports: global catalog of TCP/UDP port numbers and their known protocol.
|
|
-- Ports are not tied to a specific host here — host_ports handles that link.
|
|
-- Port numbers range from 0 to 65535 (fits in INTEGER).
|
|
CREATE TABLE IF NOT EXISTS ports (
|
|
number INTEGER PRIMARY KEY,
|
|
description TEXT
|
|
);
|