﻿ USE [MqttApp]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
--motivos cancelacion
-- DROP TABLE [MqttApp].[dbo].[User]
-- SELECT * [MqttApp].[dbo].[User]
CREATE TABLE [MqttApp].[dbo].[User](
	[Id] [int]  IDENTITY(1,1) NOT NULL,
	[UserName] [nvarchar](125) NULL,
	[FristName] [nvarchar](125) NULL,
	[LastName] [nvarchar](125) NULL,
	[Password] [nvarchar](256) NULL
PRIMARY KEY ([ID])
)
CREATE TABLE [MqttApp].[dbo].[Mqtt](
	[Id] [int]  IDENTITY(1,1) NOT NULL,
	[Payload] [nvarchar](256) NULL,
	[Topic] [nvarchar](125) NULL,
	[KeyTopic] [nvarchar](125) NULL,
	[TypeTopic] [nvarchar](32) NULL,
	[Fecha] [date] NOT NULL,
	IsActive bit not NULL
PRIMARY KEY ([Id])
)