-- previous correction in 0.8 was not complete so we need to do it again
ALTER TABLE `##faces` ADD `LABEL` VARCHAR( 75 ) NULL DEFAULT NULL;

-- REPLACE INTO `##faccess` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMID`, `ROLEID`, `ACTION`) VALUES(1, '2010-02-02 20:43:23', NULL, 0, 1, '*');

-- REPLACE INTO `##faces` (`ID`, `NAME`, `ELEMENTCOUNT`, `DATA`, `TYPE`, `ENTITY`, `LABEL`) VALUES(1, 'flink', 10, '{"6":{"subelements":{"1":{"id":1,"populate":"form","sortorder":2,"hide":0}},"rules":[],"links":[],"id":6,"label":"From          ","x":45,"y":5,"type":"system_display","column":"DISPLAYIN","children":2},"1":{"subelements":{"1":{"id":1,"populate":"0","sortorder":1}},"rules":[],"mandatory":1,"links":[],"id":1,"label":"Form ","x":45,"y":44,"type":"system_form","column":"FORMIN","children":2},"13":{"subelements":{"1":{"id":1,"populate":"form","sortorder":4,"hide":0}},"rules":[],"links":[],"id":13,"label":"To  ","x":45,"y":82,"type":"system_display","column":"DISPLAYOUT","children":2},"2":{"subelements":{"1":{"id":1,"populate":"0","sortorder":3}},"rules":[],"mandatory":1,"links":[],"id":2,"label":"Form ","x":45,"y":120,"type":"system_form","column":"FORMOUT","children":2},"9":{"subelements":{"1":{"id":1,"populate":"","sortorder":8,"hide":1}},"rules":[],"links":[],"id":9,"label":"(or URL)   ","x":45,"y":158,"type":"text_large","column":"FORMOUTALT","children":2},"12":{"subelements":{"1":{"id":1,"populate":"","sortorder":5,"hide":1}},"rules":[],"links":[],"id":12,"label":"Action   ","x":45,"y":196,"type":"text_large","column":"ACTIONOUT","children":2},"8":{"subelements":{"1":{"id":1,"populate":"","sortorder":2,"hide":1}},"rules":[],"links":[],"id":8,"label":"Mapping       ","x":45,"y":235,"type":"textarea","column":"MAPPING","children":2},"5":{"subelements":{"1":{"id":1,"populate":"","sortorder":5}},"rules":[],"links":[],"id":5,"label":"Action label  ","x":45,"y":308,"type":"text_large","column":"ACTION","children":2},"4":{"subelements":{"1":{"id":1,"populate":"","sortorder":4,"hide":1}},"rules":[],"links":[],"id":4,"label":"Icon           ","x":45,"y":346,"type":"text_large","column":"ICON","children":2},"10":{"subelements":{"1":{"id":1,"populate":"","sortorder":3,"hide":1}},"rules":[],"links":[],"id":10,"label":"Redirect after processing   ","x":45,"y":384,"type":"text_large","column":"REDIRECT","children":2}}', 'DB', 'flink', 'Links');
-- REPLACE INTO `##faces` (`ID`, `NAME`, `ELEMENTCOUNT`, `DATA`, `TYPE`, `ENTITY`, `LABEL`) VALUES(2, 'frole', 1, '{"1":{"subelements":{"1":{"id":1,"populate":""}},"rules":[],"links":[],"id":1,"label":"Name ","x":45,"y":5,"type":"text_large","column":"NAME","children":2}}', 'DB', 'frole', 'Roles');
-- REPLACE INTO `##faces` (`ID`, `NAME`, `ELEMENTCOUNT`, `DATA`, `TYPE`, `ENTITY`, `LABEL`) VALUES(3, 'faccess', 2, '{"1":{"subelements":{"1":{"id":1,"populate":"39"}},"links":[],"id":1,"label":"Form   ","x":5,"y":5,"type":"system_form","column":"FORMID","children":2},"2":{"subelements":{"1":{"id":1,"populate":"1"}},"links":[],"id":2,"label":"Role  ","x":5,"y":37,"type":"system_role","column":"ROLEID","children":2}}', 'DB', 'faccess', NULL);

INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(1, '0000-00-00 00:00:00', NULL, 1, 1, 'edit', 'edit.png', 'list', NULL, NULL, NULL, NULL, 'edit', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(2, '0000-00-00 00:00:00', NULL, 3, 3, 'edit', 'edit.png', 'list', NULL, NULL, NULL, NULL, 'edit', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(3, '0000-00-00 00:00:00', NULL, 2, 2, 'edit', 'edit.png', 'list', NULL, NULL, NULL, NULL, 'edit', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(4, '0000-00-00 00:00:00', NULL, 1, 1, 'delete', 'delete.png', 'list', NULL, NULL, NULL, NULL, 'delete', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(5, '0000-00-00 00:00:00', NULL, 3, 3, 'delete', 'delete.png', 'list', NULL, NULL, NULL, NULL, 'delete', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(6, '0000-00-00 00:00:00', NULL, 2, 2, 'delete', 'delete.png', 'list', NULL, NULL, NULL, NULL, 'delete', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(7, '0000-00-00 00:00:00', NULL, 1, 1, 'view', 'view.png', 'list', NULL, NULL, NULL, NULL, 'view', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(8, '0000-00-00 00:00:00', NULL, 3, 3, 'view', 'view.png', 'list', NULL, NULL, NULL, NULL, 'view', 'form');
INSERT INTO `##flink` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `FORMIN`, `FORMOUT`, `ACTION`, `ICON`, `DISPLAYIN`, `MAPPING`, `FORMOUTALT`, `REDIRECT`, `ACTIONIN`, `ACTIONOUT`, `DISPLAYOUT`) VALUES(9, '0000-00-00 00:00:00', NULL, 2, 2, 'view', 'view.png', 'list', NULL, NULL, NULL, NULL, 'view', 'form');

REPLACE INTO `##frole` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `NAME`) VALUES(1, '2010-02-02 20:21:41', NULL, 'ADMIN');
REPLACE INTO `##frole` (`ID`, `DATE_CREATED`, `DATE_UPDATED`, `NAME`) VALUES(2, '2010-02-02 20:21:49', NULL, 'CUSTOMER');