up.sql

Add the following statement to the up.sql script:

CREATE TABLE users (
id SERIAL PRIMARY KEY,
email TEXT NOT NULL UNIQUE
);

As you can see, the table has two columns. id represents the unique ID of the user, and we will use this identifier in other tables later. The email column contains the unique e-mail of the user. For real applications, the users table also has to contain a hashed password, and two columns to store when the user was created and updated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.176.72