IF OBJECT_ID('dbo.ordenes') IS NULL
BEGIN
    CREATE TABLE ordenes (
        tiendanube_id BIGINT NOT NULL,
		order_Id BIGINT NOT NULL,
        shipping_tracking_number VARCHAR(100) NULL,
		shipping_address_name VARCHAR(150) NULL,
		shipping_address_address VARCHAR(150) NULL,
		shipping_address_city VARCHAR(50) NULL,
		shipping_address_floor VARCHAR(5) NULL,
		shipping_address_locality VARCHAR(50) NULL,
		shipping_address_number VARCHAR(10) NULL,
		shipping_address_phone VARCHAR(25) NULL,
		shipping_address_province VARCHAR(50) NULL,
		shipping_address_zipcode VARCHAR(10) NULL,
		shipping_address_updated_at DATETIME NOT NULL,
		notified bit NULL,
		[status] VARCHAR(15) NULL,
		shipping_status VARCHAR(15) NULL,
		payment_status VARCHAR(15) NULL,
		CONSTRAINT PK_orden PRIMARY KEY (tiendanube_id,order_Id)
    );
END