Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drop table users;
- drop table role;
- create table role
- (id number primary key not null,
- is_admin number not null);
- create table users
- (name varchar(20) not null,
- passhash nvarchar2(20) not null,
- id number(19, 0) not null,
- user_id number primary key,
- role_id number references role(id));
- create table account_type
- (id number primary key not null,
- type varchar2(20) not null,
- constraint check_type check (type in ('savings', 'checking', 'interest')));
- --
- --create table "user_accounts"
- --(id number primary key not null,
- --balance number,
- --user_id number references user(id),
- --account_type_id references account_type(id)
- --);
- create table transactions
- (id number primary key not null,
- message nvarchar2(500),
- user_id number references user(id));
Add Comment
Please, Sign In to add comment