web & server: add support for email photos
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
DROP TABLE IF EXISTS email_address;
|
||||
DROP TABLE IF EXISTS photo;
|
||||
DROP TABLE IF EXISTS google_person;
|
||||
19
server/migrations/20250114045217_create-email-photos.up.sql
Normal file
19
server/migrations/20250114045217_create-email-photos.up.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE IF NOT EXISTS google_person (
|
||||
id SERIAL PRIMARY KEY,
|
||||
resource_name TEXT NOT NULL UNIQUE,
|
||||
display_name TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS email_photo (
|
||||
id SERIAL PRIMARY KEY,
|
||||
google_person_id INTEGER REFERENCES google_person (id) UNIQUE,
|
||||
url TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS email_address (
|
||||
id SERIAL PRIMARY KEY,
|
||||
address TEXT NOT NULL UNIQUE,
|
||||
email_photo_id INTEGER REFERENCES email_photo (id),
|
||||
google_person_id INTEGER REFERENCES google_person (id)
|
||||
);
|
||||
Reference in New Issue
Block a user