fix wrong test
fix none-reference text message save
revert back to use idBytes as FK ,sqlite does not allow rowid as FK