You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a good idea to label fields as foreign keys in your schema - doesn't appear to be entirely necessary, but it's good practice for "referential integrity".
e.g.
CREATE TBALE decks
(
deck_id SERIAL PRIMARY KEY,
owner_id INTEGER,
deck_name VARCHAR(255) NOT NULL,
published BOOLEAN DEFAULT false,
FOREIGN KEY (owner_id) REFERENCES users(user_id)
)
The text was updated successfully, but these errors were encountered:
It's a good idea to label fields as foreign keys in your schema - doesn't appear to be entirely necessary, but it's good practice for "referential integrity".
e.g.
CREATE TBALE decks
(
deck_id SERIAL PRIMARY KEY,
owner_id INTEGER,
deck_name VARCHAR(255) NOT NULL,
published BOOLEAN DEFAULT false,
FOREIGN KEY (owner_id) REFERENCES users(user_id)
)
The text was updated successfully, but these errors were encountered: