table_init.sql 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. drop table if exists fdroid.app_info;
  2. create table if not exists fdroid.app_info
  3. (
  4. id int auto_increment primary key,
  5. app_name varchar(30) not null,
  6. icon text,
  7. description text,
  8. repo_url text,
  9. author_id int not null,
  10. author_name varchar(30) not null,
  11. rate double not null default 0,
  12. rate_count double not null default 0,
  13. category varchar(20),
  14. build_branch varchar(20) not null ,
  15. daily_build_branch varchar(20),
  16. enable_daily_build boolean not null default false,
  17. create_time timestamp default current_timestamp not null
  18. ) charset = utf8;
  19. drop table if exists fdroid.build_task;
  20. create table if not exists fdroid.build_task
  21. (
  22. id int auto_increment primary key,
  23. app_id int not null,
  24. create_user_id int not null,
  25. create_user_name varchar(30) not null,
  26. description text,
  27. version varchar(20) not null,
  28. create_time timestamp default current_timestamp not null,
  29. update_time timestamp,
  30. status varchar(20) not null,
  31. build_type varchar(20) not null,
  32. message text
  33. ) charset = utf8;
  34. drop table if exists fdroid.app_contribute_relation;
  35. create table if not exists fdroid.app_contribute_relation
  36. (
  37. id int auto_increment primary key,
  38. app_id int not null,
  39. user_id int not null
  40. ) charset = utf8;
  41. drop table if exists fdroid.bug;
  42. create table if not exists fdroid.bug
  43. (
  44. id int auto_increment primary key,
  45. app_id int not null ,
  46. version varchar(20) not null ,
  47. user_id int not null ,
  48. user_name int not null ,
  49. create_time timestamp default current_timestamp not null ,
  50. update_time timestamp,
  51. fixed boolean default false not null ,
  52. description text not null
  53. ) charset = utf8;