ALTER TABLE Character ADD PrecioPJ INT NOT NULL DEFAULT 0;

CREATE TABLE [dbo].[WEBENGINE_MERCADOPAGO_TRANSACTIONS] (
        [id] [int] IDENTITY(1,1) PRIMARY KEY,
        [ip_payed] [varchar](50) NULL,
        [userID] [varchar](25) NULL,
        [buy_id] [varchar](25) NULL,
        [username] [varchar](50) NULL,
        [credits] [varchar](50) NULL,
        [description] [varchar](50) NULL,
        [method] [varchar](50) NULL, 
        [method_payed] [varchar](50) NULL,
        [date_create] [varchar](50) NULL, 
        [amount] [varchar](20) NULL, 
        [type_money] [varchar](10) NULL,
        [buy_status] [varchar](50) NULL,
        [buy_detail] [varchar](50) NULL, 
        [approved_date] [varchar](50) NULL
);

CREATE TABLE [dbo].[WEBENGINE_GIFT_CODE](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[TypeCode] [int] NOT NULL,
	[Codigo] [varchar](50) NOT NULL,
	[UsedMax] [int] NOT NULL,
	[UsedActual] [int] NOT NULL,
	[pLevel] [int] NOT NULL,
	[Niveles] [int] NOT NULL,
	[Resets] [int] NOT NULL,
	[MResets] [int] NOT NULL,
	[VipType] [int] NOT NULL,
	[VipDays] [int] NOT NULL,
	[TypeCoin] [varchar](15) NOT NULL,
	[Coins] [int] NOT NULL,
	[Usuario] [varchar](10) NOT NULL,
	[Personaje] [varchar](10) NOT NULL,
	[DarItem] [int] NOT NULL,
	[TypeWare] [int] NOT NULL,
	[iName] [varchar](100) NOT NULL,
	[iGroup] [int] NOT NULL,
	[iIndex] [int] NOT NULL,
	[iLevel] [int] NOT NULL
) ON [PRIMARY]


CREATE TABLE [dbo].[WEBENGINE_GIFT_CODE_LOGS](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Codigo] [varchar](50) NOT NULL,
	[Usuario] [varchar](10) NOT NULL,
	[Personaje] [varchar](10) NOT NULL,
	[Fecha]	[date] NOT NULL
) ON [PRIMARY]

CREATE TABLE [dbo].[WEBENGINE_WEBSHOP_LOGS](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [Grupo] [int] NOT NULL,
    [Usuario] [varchar](50) NOT NULL,
    [Personaje] [varchar](50) NOT NULL,
    [Item] [varchar](100) NOT NULL,
    [NivelItem] [int] NOT NULL,
    [Skill] [int] NOT NULL,
    [Luck] [int] NOT NULL,
    [OpLife] [int] NOT NULL,
    [OpExe] [varchar](50) NOT NULL,
    [Acc] [int] NOT NULL,
    [Harmony] [int] NOT NULL,
    [Op380] [int] NOT NULL,
    [Socket1] [int] NOT NULL,
    [Socket2] [int] NOT NULL,
    [Socket3] [int] NOT NULL,
    [Socket4] [int] NOT NULL,
    [Socket5] [int] NOT NULL,
    [PrecioTotal] [int] NOT NULL,
    [Moneda] [varchar](50)  NOT NULL,
    [SaldoRestante] [int] NOT NULL,
    [Fecha] [date] NOT NULL,
) ON [PRIMARY]

CREATE TABLE [dbo].[WEBENGINE_GUIDES](
	[guides_id] [int] IDENTITY(1,1) NOT NULL,
	[guides_title] [varchar](max) NOT NULL,
	[guides_author] [varchar](50) NOT NULL,
	[guides_date] [varchar](50) NOT NULL,
	[guides_content] [text] NOT NULL,
	[allow_comments] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];


CREATE TABLE [dbo].[WEBENGINE_GUIDES_TRANSLATIONS](
	[guides_id] [int] NOT NULL,
	[guides_language] [varchar](10) NOT NULL,
	[guides_title] [varchar](max) NOT NULL,
	[guides_content] [text] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];

CREATE TABLE [dbo].[WEBENGINE_CHANGELOGS](
	[changelogs_id] [int] IDENTITY(1,1) NOT NULL,
	[changelogs_title] [varchar](max) NOT NULL,
	[changelogs_author] [varchar](50) NOT NULL,
	[changelogs_date] [varchar](50) NOT NULL,
	[changelogs_content] [text] NOT NULL,
	[changelogs_prefijo] [int] NOT NULL,
	[allow_comments] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];

CREATE TABLE [dbo].[WEBENGINE_CHANGELOGS_TRANSLATIONS](
	[changelogs_id] [int] NOT NULL,
	[changelogs_language] [varchar](10) NOT NULL,
	[changelogs_title] [varchar](max) NOT NULL,
	[changelogs_content] [text] NOT NULL,
	[changelogs_prefijo] [varchar](max) NOT NULL,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];