Guest User

Untitled

a guest
Oct 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. drop table users;
  2. drop table role;
  3. create table role
  4. (id number primary key not null,
  5. is_admin number not null);
  6.  
  7. create table users
  8. (name varchar(20) not null,
  9. passhash nvarchar2(20) not null,
  10. id number(19, 0) not null,
  11. user_id number primary key,
  12. role_id number references role(id));
  13.  
  14. create table account_type
  15. (id number primary key not null,
  16. type varchar2(20) not null,
  17. constraint check_type check (type in ('savings', 'checking', 'interest')));
  18. --
  19. --create table "user_accounts"
  20. --(id number primary key not null,
  21. --balance number,
  22. --user_id number references user(id),
  23. --account_type_id references account_type(id)
  24. --);
  25.  
  26. create table transactions
  27. (id number primary key not null,
  28. message nvarchar2(500),
  29. user_id number references user(id));
Add Comment
Please, Sign In to add comment