14 lines
475 B
SQL
14 lines
475 B
SQL
CREATE TABLE userProfile
|
|
(
|
|
id UUID UNIQUE PRIMARY KEY REFERENCES users (id) ON DELETE CASCADE,
|
|
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
heroImageUrl TEXT DEFAULT '',
|
|
thumbnailImageUrl TEXT DEFAULT ''
|
|
);
|
|
|
|
CREATE TRIGGER userProfile_updated_at
|
|
BEFORE UPDATE
|
|
ON userProfile
|
|
FOR EACH ROW
|
|
EXECUTE PROCEDURE updated_at_timestamp();
|