blogdog, add foreign key constraint

I updated blogdog so that it shows sqlite within play framework using a foreign key. The trick is to get slick when it initialises to add the correct PRAGMA for sqlite. This is the value in application.conf

slick.dbs.default.db.connectionInitSql=”PRAGMA foreign_keys = ON”

then ensure db is created correctly (from evolutions 1.sql)

create table “BLOGS” (ID INTEGER PRIMARY KEY,USERS_ID INTEGER NOT NULL, USER VARCHAR NOT NULL,”WHEN” TIMESTAMP NOT NULL, WHAT VARCHAR NOT NULL , FOREIGN KEY(USERS_ID) REFERENCES USERS(ID));

note that foreign key cannot be a string value

full source is here https://github.com/bernardjason/blogdog