AstroCom-API/migrations/003_gen_directory_table.sql

6 lines
333 B
SQL

CREATE TABLE IF NOT EXISTS directory (
number INTEGER PRIMARY KEY NOT NULL, -- This is the directory phone number
name TEXT NOT NULL, -- This is the text of the entry, set by the user.
route INTEGER NOT NULL, -- This is the ID of the route that owns this entry. Foreign key to routes.id
FOREIGN KEY(route) REFERENCES routes(id)
)