Hey everyone,
So i'm setting Freichat on a customize website and i'm using postgreysql.(9.2)
I'm actually stuck in the freichat smart custom installation - step 1, after the successful connection to the db ( i just had to switch the mysql driver with the postgreysql one).
So the thing is that i only have install.sql (mysql) and install_mssql.sql (MS sql) files and I really need the one compatible with postgre.
I tryed to convert it by myself but it's really difficult and there are errors i can't correct without affecting the whole freichat use.
ex :
mysql: CREATE TABLE IF NOT EXISTS `frei_chat` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`from` int(11) NOT NULL,
`from_name` varchar(30) NOT NULL,
`to` int(11) NOT NULL,
`to_name` varchar(30) NOT NULL,
`message` text NOT NULL,
`sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`recd` int(10) unsigned NOT NULL DEFAULT '0',
`time` double(15,4) NOT NULL,
`GMT_time` bigint(20) NOT NULL,
`message_type` int(11) NOT NULL DEFAULT '0',
`room_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
postegre: CREATE SEQUENCE frei_chat_seq;
CREATE TABLE IF NOT EXISTS frei_chat (
id int check (id > 0) NOT NULL DEFAULT NEXTVAL ('frei_chat_seq'),
from int NOT NULL, // the from of this line always create an error with postgre
from_name varchar(30) NOT NULL,
to int NOT NULL,
to_name varchar(30) NOT NULL,
message text NOT NULL,
sent timestamp(0) NOT NULL DEFAULT '0000-00-00 00:00:00',
recd int check (recd > 0) NOT NULL DEFAULT '0',
time double precision NOT NULL,
GMT_time bigint NOT NULL,
message_type int NOT NULL DEFAULT '0',
room_id bigint NOT NULL,
PRIMARY KEY (id)
) ;
ALTER SEQUENCE frei_chat_seq RESTART WITH 1;
My question is: would you have a version of that install.sql fully compatible with postgrey ??