Loading…
Design and visualize database schemas with ER diagrams. Review the result before reusing it in another workflow.
Select a table to edit
CREATE TABLE users ( id INT NOT NULL DEFAULT AUTO_INCREMENT, email VARCHAR(255) NOT NULL UNIQUE, name VARCHAR(255) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); CREATE TABLE posts ( id INT NOT NULL DEFAULT AUTO_INCREMENT, user_id INT NOT NULL, title VARCHAR(255) NOT NULL, content TEXT, PRIMARY KEY (id), FOREIGN KEY (user_id) REFERENCES users(id) );