 );
 
 CREATE TABLE cheesecake_main_indices (
-    id SERIAL,
+    id SERIAL PRIMARY KEY,
     absolute INTEGER NOT NULL,
-    relative INTEGER NOT NULL,
-    PRIMARY KEY (id)
+    relative INTEGER NOT NULL
 );
 
 CREATE TABLE cheesecake_subindices (

CREATE INDEX trove_class_id_idx ON trove_classifiers(id);


-- trove ids sequence
-- nosqlite
CREATE TABLE dual (dummy INTEGER);
INSERT INTO dual VALUES (1);
CREATE SEQUENCE trove_ids;
SELECT setval('trove_ids', 1000) FROM dual;
-- nosqlite-end


-- Table structure for table: release_classifiers
CREATE TABLE release_classifiers (
   name TEXT,


-- ratings
CREATE TABLE ratings(
   id SERIAL PRIMARY KEY,
   name TEXT,
   version TEXT,
   user_name TEXT REFERENCES users ON DELETE CASCADE,
   date TIMESTAMP,
   rating INTEGER,
   FOREIGN KEY (name, version) REFERENCES releases ON UPDATE CASCADE ON DELETE CASCADE
);
CREATE INDEX rating_name_version ON ratings(name, version);
