apps.sql 630 B

123456789101112131415161718192021
  1. DROP TABLE IF EXISTS app;
  2. CREATE TABLE app (
  3. id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  4. modify_id INT UNSIGNED,
  5. status CHAR(1) DEFAULT 'P' NOT NULL,
  6. cat_id INT UNSIGNED NOT NULL,
  7. date_added DATETIME NOT NULL,
  8. rating FLOAT DEFAULT 0.0 NOT NULL,
  9. votes INT UNSIGNED DEFAULT 0 NOT NULL,
  10. name VARCHAR(255) NOT NULL,
  11. has_screenshot CHAR(1) DEFAULT 'N' NOT NULL,
  12. homepage_url VARCHAR(255),
  13. submitter VARCHAR(100),
  14. approved_by VARCHAR(20),
  15. blurb TEXT,
  16. #
  17. PRIMARY KEY app_pk (id),
  18. INDEX app_status_idx (status),
  19. INDEX app_cat_id_idx (cat_id),
  20. INDEX app_date_added_idx (date_added)
  21. );