1 -- create database test ;
2 -- grant all on test.* to test ;
4 DROP TABLE IF EXISTS test.documents;
5 CREATE TABLE test.documents
7 id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
8 group_id INTEGER NOT NULL,
9 group_id2 INTEGER NOT NULL,
10 date_added DATETIME NOT NULL,
11 title VARCHAR(255) NOT NULL,
15 REPLACE INTO test.documents ( id, group_id, group_id2, date_added, title, content ) VALUES
16 ( 1, 1, 5, NOW(), 'test one', 'this is my test document number one. also checking search within phrases.' ),
17 ( 2, 1, 6, NOW(), 'test two', 'this is my test document number two' ),
18 ( 3, 2, 7, NOW(), 'another doc', 'this is another group' ),
19 ( 4, 2, 8, NOW(), 'doc number four', 'this is to test groups' );
21 DROP TABLE IF EXISTS test.tags;
22 CREATE TABLE test.tags
24 docid INTEGER NOT NULL,
25 tagid INTEGER NOT NULL,
29 INSERT INTO test.tags VALUES
30 (1,1), (1,3), (1,5), (1,7),