Ajuda para converter um script de mssql/mysql para firebird
Seguinte pessoal, tenho uma aplicação rodando aqui na minha empresa que é está rodando em Firebird, precizo fazer algumas modificações e inserts no banco de dados para instalar uma modificação só que só tenho os scripts em mssql e mysql. alguém poderia me da uma ajuda para converter isso em Firebird pois sou meio leigo em banco de dados.
SCRIPT EM MSSQL...........
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´a_calendar´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´m_calendar_edit_other_users_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´m_calendar_delete_other_users_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_view_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_create_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_edit_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_delete_events´, 1, 0, 0);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_config]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_config]
CREATE TABLE dbo.phpbb_calendar_config (config_name varchar(255) NOT NULL, config_value varchar(255) NOT NULL);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´first_day_of_week´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´index_display_week´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´index_display_next_events´, 5);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´hour_mode´, 12);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´display_truncated_name´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´prune_frequency´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´last_prune´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´prune_limit´, 2592000);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´display_hidden_groups´, 0);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_event_types]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_event_types]
CREATE TABLE dbo.phpbb_calendar_event_types (
etype_id tinyint identity NOT NULL PRIMARY KEY,
etype_index tinyint NOT NULL default ´0´,
etype_full_name varchar(255) DEFAULT (´´) NOT NULL,
etype_display_name varchar(255) DEFAULT (´´) NOT NULL,
etype_color varchar(6) DEFAULT (´´) NOT NULL,
etype_image varchar(255) NOT NULL,
);
SET IDENTITY_INSERT dbo.phpbb_calendar_event_types ON
INSERT INTO dbo.phpbb_calendar_event_types (etype_id,etype_index,etype_full_name,etype_display_name,etype_color,etype_image
) VALUES
(1,1,´Generic Event´,´´,´´,´´);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_events]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_events]
CREATE TABLE dbo.phpbb_calendar_events (
event_id int identity NOT NULL PRIMARY KEY,
etype_id tinyint NOT NULL,
sort_timestamp bigint NOT NULL,
event_start_time bigint NOT NULL,
event_end_time bigint NOT NULL,
event_all_day tinyint NOT NULL default ´0´,
event_day varchar(10) DEFAULT (´´) NOT NULL,
event_subject varchar(255) DEFAULT (´´) NOT NULL,
event_body Text NOT NULL,
poster_id int DEFAULT ´0´ NOT NULL,
event_access_level tinyint NOT NULL default ´0´,
group_id int DEFAULT ´0´ NOT NULL,
enable_bbcode tinyint NOT NULL default ´1´,
enable_smilies tinyint NOT NULL default ´1´,
enable_magic_url tinyint NOT NULL default ´1´,
bbcode_bitfield varchar(255) DEFAULT (´´) NOT NULL,
bbcode_uid varchar(8) DEFAULT (´´) NOT NULL,
);
O MESMO SCRIPT EM MySQL40 .............................
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´a_calendar´, 1, 0, 0),
(´m_calendar_edit_other_users_events´, 1, 0, 0),
(´m_calendar_delete_other_users_events´, 1, 0, 0),
(´u_calendar_view_events´, 1, 0, 0),
(´u_calendar_create_events´, 1, 0, 0),
(´u_calendar_edit_events´, 1, 0, 0),
(´u_calendar_delete_events´, 1, 0, 0);
DROP TABLE IF EXISTS ´phpbb_calendar_config´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_config´ (
´config_name´ varchar(255) NOT NULL,
´config_value´ varchar(255) NOT NULL
);
INSERT INTO ´phpbb_calendar_config´ (´config_name´, ´config_value´) VALUES
(´first_day_of_week´, ´0´),
(´index_display_week´, ´0´),
(´index_display_next_events´, ´5´),
(´hour_mode´, ´12´),
(´display_truncated_name´, ´0´),
(´prune_frequency´, ´0´),
(´last_prune´, ´0´),
(´prune_limit´, ´2592000´),
(´display_hidden_groups´, ´0´);
DROP TABLE IF EXISTS ´phpbb_calendar_event_types´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_event_types´ (
´etype_id´ tinyint(3) unsigned NOT NULL auto_increment,
´etype_index´ tinyint(3) unsigned NOT NULL default ´0´,
´etype_full_name´ blob NOT NULL,
´etype_display_name´ blob NOT NULL,
´etype_color´ blob NOT NULL,
´etype_image´ varchar(255) NOT NULL,
PRIMARY KEY (´etype_id´)
);
INSERT INTO ´phpbb_calendar_event_types´ (´etype_id´,´etype_index´,´etype_full_name´,´etype_display_name´,´etype_color´,´etype_image´) VALUES
(1,1,´Generic Event´,´´,´´,´´);
DROP TABLE IF EXISTS ´phpbb_calendar_events´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_events´ (
´event_id´ int(10) unsigned NOT NULL auto_increment,
´etype_id´ tinyint(4) NOT NULL,
´sort_timestamp´ bigint(20) unsigned NOT NULL,
´event_start_time´ bigint(20) unsigned NOT NULL,
´event_end_time´ bigint(20) unsigned NOT NULL,
´event_all_day´ tinyint(2) NOT NULL default ´0´,
´event_day´ blob NOT NULL,
´event_subject´ blob NOT NULL,
´event_body´ longblob NOT NULL,
´poster_id´ mediumint(8) UNSIGNED DEFAULT ´0´ NOT NULL,
´event_access_level´ tinyint(1) NOT NULL default ´0´,
´group_id´ mediumint(8) UNSIGNED DEFAULT ´0´ NOT NULL,
´enable_bbcode´ tinyint(1) unsigned NOT NULL default ´1´,
´enable_smilies´ tinyint(1) unsigned NOT NULL default ´1´,
´enable_magic_url´ tinyint(1) unsigned NOT NULL default ´1´,
´bbcode_bitfield´ blob NOT NULL,
´bbcode_uid´ blob NOT NULL,
PRIMARY KEY (´event_id´)
);
SCRIPT EM MSSQL...........
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´a_calendar´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´m_calendar_edit_other_users_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´m_calendar_delete_other_users_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_view_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_create_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_edit_events´, 1, 0, 0);
INSERT INTO dbo.phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´u_calendar_delete_events´, 1, 0, 0);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_config]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_config]
CREATE TABLE dbo.phpbb_calendar_config (config_name varchar(255) NOT NULL, config_value varchar(255) NOT NULL);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´first_day_of_week´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´index_display_week´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´index_display_next_events´, 5);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´hour_mode´, 12);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´display_truncated_name´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´prune_frequency´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´last_prune´, 0);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´prune_limit´, 2592000);
INSERT INTO dbo.phpbb_calendar_config (config_name, config_value) VALUES (´display_hidden_groups´, 0);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_event_types]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_event_types]
CREATE TABLE dbo.phpbb_calendar_event_types (
etype_id tinyint identity NOT NULL PRIMARY KEY,
etype_index tinyint NOT NULL default ´0´,
etype_full_name varchar(255) DEFAULT (´´) NOT NULL,
etype_display_name varchar(255) DEFAULT (´´) NOT NULL,
etype_color varchar(6) DEFAULT (´´) NOT NULL,
etype_image varchar(255) NOT NULL,
);
SET IDENTITY_INSERT dbo.phpbb_calendar_event_types ON
INSERT INTO dbo.phpbb_calendar_event_types (etype_id,etype_index,etype_full_name,etype_display_name,etype_color,etype_image
) VALUES
(1,1,´Generic Event´,´´,´´,´´);
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N´[dbo].[phpbb_calendar_events]´) AND type in (N´U´))
DROP TABLE [dbo].[phpbb_calendar_events]
CREATE TABLE dbo.phpbb_calendar_events (
event_id int identity NOT NULL PRIMARY KEY,
etype_id tinyint NOT NULL,
sort_timestamp bigint NOT NULL,
event_start_time bigint NOT NULL,
event_end_time bigint NOT NULL,
event_all_day tinyint NOT NULL default ´0´,
event_day varchar(10) DEFAULT (´´) NOT NULL,
event_subject varchar(255) DEFAULT (´´) NOT NULL,
event_body Text NOT NULL,
poster_id int DEFAULT ´0´ NOT NULL,
event_access_level tinyint NOT NULL default ´0´,
group_id int DEFAULT ´0´ NOT NULL,
enable_bbcode tinyint NOT NULL default ´1´,
enable_smilies tinyint NOT NULL default ´1´,
enable_magic_url tinyint NOT NULL default ´1´,
bbcode_bitfield varchar(255) DEFAULT (´´) NOT NULL,
bbcode_uid varchar(8) DEFAULT (´´) NOT NULL,
);
O MESMO SCRIPT EM MySQL40 .............................
INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES (´a_calendar´, 1, 0, 0),
(´m_calendar_edit_other_users_events´, 1, 0, 0),
(´m_calendar_delete_other_users_events´, 1, 0, 0),
(´u_calendar_view_events´, 1, 0, 0),
(´u_calendar_create_events´, 1, 0, 0),
(´u_calendar_edit_events´, 1, 0, 0),
(´u_calendar_delete_events´, 1, 0, 0);
DROP TABLE IF EXISTS ´phpbb_calendar_config´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_config´ (
´config_name´ varchar(255) NOT NULL,
´config_value´ varchar(255) NOT NULL
);
INSERT INTO ´phpbb_calendar_config´ (´config_name´, ´config_value´) VALUES
(´first_day_of_week´, ´0´),
(´index_display_week´, ´0´),
(´index_display_next_events´, ´5´),
(´hour_mode´, ´12´),
(´display_truncated_name´, ´0´),
(´prune_frequency´, ´0´),
(´last_prune´, ´0´),
(´prune_limit´, ´2592000´),
(´display_hidden_groups´, ´0´);
DROP TABLE IF EXISTS ´phpbb_calendar_event_types´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_event_types´ (
´etype_id´ tinyint(3) unsigned NOT NULL auto_increment,
´etype_index´ tinyint(3) unsigned NOT NULL default ´0´,
´etype_full_name´ blob NOT NULL,
´etype_display_name´ blob NOT NULL,
´etype_color´ blob NOT NULL,
´etype_image´ varchar(255) NOT NULL,
PRIMARY KEY (´etype_id´)
);
INSERT INTO ´phpbb_calendar_event_types´ (´etype_id´,´etype_index´,´etype_full_name´,´etype_display_name´,´etype_color´,´etype_image´) VALUES
(1,1,´Generic Event´,´´,´´,´´);
DROP TABLE IF EXISTS ´phpbb_calendar_events´;
CREATE TABLE IF NOT EXISTS ´phpbb_calendar_events´ (
´event_id´ int(10) unsigned NOT NULL auto_increment,
´etype_id´ tinyint(4) NOT NULL,
´sort_timestamp´ bigint(20) unsigned NOT NULL,
´event_start_time´ bigint(20) unsigned NOT NULL,
´event_end_time´ bigint(20) unsigned NOT NULL,
´event_all_day´ tinyint(2) NOT NULL default ´0´,
´event_day´ blob NOT NULL,
´event_subject´ blob NOT NULL,
´event_body´ longblob NOT NULL,
´poster_id´ mediumint(8) UNSIGNED DEFAULT ´0´ NOT NULL,
´event_access_level´ tinyint(1) NOT NULL default ´0´,
´group_id´ mediumint(8) UNSIGNED DEFAULT ´0´ NOT NULL,
´enable_bbcode´ tinyint(1) unsigned NOT NULL default ´1´,
´enable_smilies´ tinyint(1) unsigned NOT NULL default ´1´,
´enable_magic_url´ tinyint(1) unsigned NOT NULL default ´1´,
´bbcode_bitfield´ blob NOT NULL,
´bbcode_uid´ blob NOT NULL,
PRIMARY KEY (´event_id´)
);
Lobo008
Curtidas 0