up.sql 324 B

1234567891011
  1. -- Your SQL goes here
  2. CREATE TABLE dictionaries_users (
  3. id SERIAL PRIMARY KEY,
  4. dictionaries_id INTEGER NOT NULL,
  5. user_id INTEGER NOT NULL,
  6. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
  7. );
  8. CREATE UNIQUE INDEX dictionaries_user_id ON dictionaries_users (dictionaries_id,user_id);