12 |
create table lists ( |
create table lists ( |
13 |
id serial, |
id serial, |
14 |
name text not null, |
name text not null, |
15 |
|
email text not null, |
16 |
bounce_limit int not null default 3, |
bounce_limit int not null default 3, |
17 |
date timestamp not null default now(), |
date timestamp not null default now(), |
18 |
primary key(id) |
primary key(id) |
65 |
insert into users (email, full_name) values ('dpavlin@gmail.com', 'DbP'); |
insert into users (email, full_name) values ('dpavlin@gmail.com', 'DbP'); |
66 |
insert into users (email, full_name) values ('xxx_doesnt_exist_xxx@gmail.com', 'fake'); |
insert into users (email, full_name) values ('xxx_doesnt_exist_xxx@gmail.com', 'fake'); |
67 |
|
|
68 |
insert into lists (name) values ('Just me'); |
insert into lists (name, email) values ('Just me','my-alter-ego@rot13.org'); |
69 |
insert into lists (name) values ('All users'); |
insert into lists (name, email) values ('All users','announce@example.com'); |
70 |
|
|
71 |
insert into user_list (user_id, list_id) select users.id,1 from users limit 1; |
insert into user_list (user_id, list_id) select users.id,1 from users limit 1; |
72 |
insert into user_list (user_id, list_id) select users.id,2 from users; |
insert into user_list (user_id, list_id) select users.id,2 from users; |