IF OBJECT_ID('dbo.mw_banned_accounts', 'U') IS NOT NULL DROP TABLE dbo.mw_banned_accounts;
create table mw_banned_accounts (
id integer identity(1, 1) primary key not null,
account varchar(10) not null,
cause nvarchar(MAX) collate Latin1_General_CI_AS null,
block_date datetime default getdate() not null,
unblock_date datetime null,
user_block_id integer null,
status integer default 1 not null
);
IF OBJECT_ID('dbo.mw_config', 'U') IS NOT NULL DROP TABLE dbo.mw_config;
create table mw_config (
id integer identity(1, 1) primary key not null,
config varchar(400) not null,
body nvarchar(MAX) collate Latin1_General_CI_AS null,
type varchar(10) null
);
IF OBJECT_ID('dbo.mw_services', 'U') IS NOT NULL DROP TABLE dbo.mw_services;
create table mw_services (
id integer identity(1, 1) primary key not null,
name nvarchar(250) collate Latin1_General_CI_AS not null,
service varchar(250) not null,
active integer not null,
sequence integer not null,
url varchar(250) null,
config_url varchar(250) null,
parent_id integer null,
allowed integer not null,
rates text null
);
IF OBJECT_ID('dbo.mw_viptype_services', 'U') IS NOT NULL DROP TABLE dbo.mw_viptype_services;
create table mw_viptype_services (
id integer identity(1, 1) primary key not null,
viptype varchar(2) not null,
service_id integer not null
);
IF OBJECT_ID('dbo.mw_users', 'U') IS NOT NULL DROP TABLE dbo.mw_users;
create table mw_users (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
email varchar(200) null,
username varchar(40) not null,
password varchar(60) not null,
super_user integer default 0 not null,
group_id integer not null
);
IF OBJECT_ID('dbo.mw_user_groups', 'U') IS NOT NULL DROP TABLE dbo.mw_user_groups;
create table mw_user_groups (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
access text null
);
IF OBJECT_ID('dbo.mw_records', 'U') IS NOT NULL DROP TABLE dbo.mw_records;
create table mw_records (
id integer identity(1, 1) primary key not null,
type varchar(100) not null,
record integer not null default 0,
record_date datetime default getdate() not null,
);
IF OBJECT_ID('dbo.mw_jobs', 'U') IS NOT NULL DROP TABLE dbo.mw_jobs;
create table mw_jobs (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
minutes varchar(50) not null default '*',
hours varchar(50) not null default '*',
days varchar(50) not null default '*',
weeks varchar(50) not null default '*',
months varchar(50) not null default '*',
last_execution datetime null,
script_file varchar(200) null,
script text null,
result text null,
active integer not null default 0
);
IF OBJECT_ID('dbo.mw_news', 'U') IS NOT NULL DROP TABLE dbo.mw_news;
create table mw_news (
id integer identity(1, 1) primary key not null,
title nvarchar(400) collate Latin1_General_CI_AS not null,
slug varchar(400) not null,
body nvarchar(MAX) collate Latin1_General_CI_AS not null,
link varchar(400) collate Latin1_General_CI_AS null,
create_date datetime default getdate() not null,
type varchar(100) not null,
views integer default 0 not null,
user_id integer null,
image_cover varchar(250) null,
allow_comments integer default 0 not null
);
IF OBJECT_ID('dbo.mw_news_comments', 'U') IS NOT NULL DROP TABLE dbo.mw_news_comments;
create table mw_news_comments (
id integer identity(1, 1) primary key not null,
comment nvarchar(max) not null,
author varchar(100) not null,
admin integer default 0 not null,
ip varchar(40) not null,
create_date datetime default getdate() not null,
news_id integer not null
);
IF OBJECT_ID('dbo.mw_helpdesk_tickets', 'U') IS NOT NULL DROP TABLE dbo.mw_helpdesk_tickets;
create table mw_helpdesk_tickets (
id integer identity(1, 1) primary key not null,
department nvarchar(200) collate Latin1_General_CI_AS not null,
subject nvarchar(300) collate Latin1_General_CI_AS not null,
message nvarchar(MAX) collate Latin1_General_CI_AS not null,
create_date datetime default getdate() not null,
update_date datetime null,
status integer default 1 not null,
account varchar(10) not null,
images varchar(700) null
);
IF OBJECT_ID('dbo.mw_helpdesk_ticket_messages', 'U') IS NOT NULL DROP TABLE dbo.mw_helpdesk_ticket_messages;
create table mw_helpdesk_ticket_messages (
id integer identity(1, 1) primary key not null,
message nvarchar(MAX) collate Latin1_General_CI_AS not null,
admin integer default 0 not null,
account varchar(100) not null,
create_date datetime default getdate() not null,
ticket_id integer not null,
images varchar(700) null
);
IF OBJECT_ID('dbo.mw_packages', 'U') IS NOT NULL DROP TABLE dbo.mw_packages;
create table mw_packages (
id integer identity(1, 1) primary key not null,
package nvarchar(200) collate Latin1_General_CI_AS not null,
description nvarchar(MAX) null,
price numeric(10,2) not null,
viptype integer null,
vipdays integer null,
coins text null,
active integer not null,
sequence integer not null,
image varchar(200) null
);
IF OBJECT_ID('dbo.mw_logs', 'U') IS NOT NULL DROP TABLE dbo.mw_logs;
create table mw_logs (
id integer identity(1, 1) primary key not null,
create_date datetime default getdate() not null,
log text not null,
account varchar(10) not null,
type varchar(50) null,
table_name varchar(30) null,
primary_key varchar(20) null,
metadata text null
);
IF OBJECT_ID('dbo.mw_shops', 'U') IS NOT NULL DROP TABLE dbo.mw_shops;
create table mw_shops (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
slug varchar(400) not null,
description nvarchar(max) collate Latin1_General_CI_AS not null,
coin varchar(20) not null,
sequence integer not null,
active integer not null,
max_level integer not null default 13,
max_option integer not null default 16,
unique_sockets integer not null default 0,
default_price_level integer null,
default_price_option integer null,
default_price_skill integer null,
default_price_luck integer null,
default_price_ancient integer null,
default_price_harmony integer null,
default_price_refine integer null,
default_price_socket integer null,
default_price_excellent integer null,
default_max_excellent integer null,
default_max_sockets integer null,
image varchar(100) null,
);
IF OBJECT_ID('dbo.mw_shop_categories', 'U') IS NOT NULL DROP TABLE dbo.mw_shop_categories;
create table mw_shop_categories (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
type varchar(100) null,
slug varchar(400) not null,
sequence integer not null,
active integer not null,
parent_id integer null,
shop_id integer not null
);
IF OBJECT_ID('dbo.mw_shop_items', 'U') IS NOT NULL DROP TABLE dbo.mw_shop_items;
create table mw_shop_items (
id integer identity(1, 1) primary key not null,
name nvarchar(100) collate Latin1_General_CI_AS not null,
section integer not null,
index_ integer not null,
durability integer not null default 255,
x_size integer not null default 1,
y_size integer not null default 1,
ancient varchar(5) null,
skill integer not null default 0,
refine integer not null default 0,
sockets integer not null default 0,
harmony integer not null default 0,
slug varchar(400) not null,
active integer not null,
price integer not null default 0,
price_level integer not null default 0,
price_option integer not null default 0,
price_skill integer not null default 0,
price_luck integer not null default 0,
price_ancient integer not null default 0,
price_harmony integer not null default 0,
price_refine integer not null default 0,
price_socket integer not null default 0,
price_excellent integer not null default 0,
max_excellent integer not null default 6,
max_sockets integer not null default 5,
image varchar(100) null,
classes varchar(100) null,
solds integer not null default 0,
offer integer not null default 0,
fix_level integer not null default -1,
fix_option integer not null default -1,
luck integer not null default 1,
category_id integer null
);
IF OBJECT_ID('dbo.mw_shop_coupons', 'U') IS NOT NULL DROP TABLE dbo.mw_shop_coupons;
create table mw_shop_coupons (
id integer identity(1, 1) primary key not null,
coupon varchar(100) not null,
start_date date null,
expire_date date null,
active integer not null,
discount numeric(10,2) not null,
create_date datetime default getdate() not null
);
IF OBJECT_ID('dbo.mw_orders', 'U') IS NOT NULL DROP TABLE dbo.mw_orders;
create table mw_orders (
id integer identity(1, 1) primary key not null,
username varchar(10) not null,
gateway varchar(100) not null,
code varchar(400) null,
value numeric(10,2) not null,
status integer not null,
currency varchar(10) null,
create_date datetime default getdate() not null,
transaction_id varchar(100) null
);
IF OBJECT_ID('dbo.mw_polls', 'U') IS NOT NULL DROP TABLE dbo.mw_polls;
create table mw_polls (
id integer identity(1, 1) primary key not null,
title varchar(200) not null,
start_date date default getdate() not null,
end_date date null,
active integer default 0 not null,
allow_multiple integer default 0 not null,
only_logged_in integer default 0 not null,
allow_ips integer default 0 not null
);
IF OBJECT_ID('dbo.mw_polls_answers', 'U') IS NOT NULL DROP TABLE dbo.mw_polls_answers;
create table mw_polls_answers (
id integer identity(1, 1) primary key not null,
answer varchar(200) not null,
poll_id integer not null,
sequence integer null,
total integer default 0 not null
);
IF OBJECT_ID('dbo.mw_polls_answers_persons', 'U') IS NOT NULL DROP TABLE dbo.mw_polls_answers_persons;
create table mw_polls_answers_persons (
id integer identity(1, 1) primary key not null,
answer_id integer not null,
ip varchar(40) not null,
account varchar(10) null
);
IF OBJECT_ID('dbo.mw_market_items', 'U') IS NOT NULL DROP TABLE dbo.mw_market_items;
create table mw_market_items (
id integer identity(1, 1) primary key not null,
hex varchar(64) not null,
payment_type varchar(10) not null,
coin varchar(100) null,
price varchar(10) not null,
account varchar(10) not null,
selling_start_date date not null,
bought_by varchar(10) null,
bought_date date null,
item_name varchar(100) not null,
item_section integer not null,
item_level integer not null,
item_option integer not null
);
IF OBJECT_ID('dbo.mw_auth_tokens', 'U') IS NOT NULL DROP TABLE dbo.mw_auth_tokens;
create table mw_auth_tokens (
id integer identity(1, 1) primary key not null,
token varchar(40) not null,
account varchar(10) not null,
expires bigint not null
);
IF OBJECT_ID('dbo.mw_indication_goals', 'U') IS NOT NULL DROP TABLE dbo.mw_indication_goals;
create table mw_indication_goals (
id integer identity(1, 1) primary key not null,
goal varchar(200) not null,
coin varchar(20) not null,
amount text not null
);
IF OBJECT_ID('dbo.mw_indication_rewards', 'U') IS NOT NULL DROP TABLE dbo.mw_indication_rewards;
create table mw_indication_rewards (
id integer identity(1, 1) primary key not null,
account varchar(10) not null,
indication varchar(10) not null,
indication_goal_id integer not null,
rewarded integer not null default 0,
amount integer not null default 0
);