 CREATE TABLE gi_webservice_config (
     id INTEGER NOT NULL IDENTITY(1,1) ,
     name NVARCHAR (200) NOT NULL,
-    config VARBINARY (MAX) NOT NULL,
+    config NVARCHAR (MAX) NOT NULL,
     config_md5 NVARCHAR (32) NOT NULL,
     valid_id SMALLINT NOT NULL,
     create_time DATETIME NOT NULL,

    field_order INTEGER NOT NULL,
    field_type NVARCHAR (200) NOT NULL,
    object_type NVARCHAR (200) NOT NULL,
    config VARBINARY (MAX) NULL,
    valid_id SMALLINT NOT NULL,
    create_time DATETIME NOT NULL,
    create_by INTEGER NOT NULL,
    change_time DATETIME NOT NULL,
    change_by INTEGER NOT NULL,
    PRIMARY KEY(id),
    CONSTRAINT dynamic_field_U_741 UNIQUE (name)
);
ALTER TABLE gi_webservice_config ADD CONSTRAINT FK_gi_webservice_config_create_by_id FOREIGN KEY (create_by) REFERENCES users (id);
ALTER TABLE gi_webservice_config ADD CONSTRAINT FK_gi_webservice_config_change_by_id FOREIGN KEY (change_by) REFERENCES users (id);

-- ----------------------------------------------------------
--  driver: mssql, generated: 2011-09-21 16:47:24
-- ----------------------------------------------------------
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE name = 'DF_ticket_index_queue' )
