Advertisement
hecrus

Like,rating DB tables

Jul 2nd, 2021
4,761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.05 KB | None | 0 0
  1.  
  2. /****** Object:  Table [dbo].[as_like_items]    Script Date: 02.07.2021 8:42:07 ******/
  3. SET ANSI_NULLS ON
  4. GO
  5. SET QUOTED_IDENTIFIER ON
  6. GO
  7. CREATE TABLE [dbo].[as_like_items](
  8.     [id] [INT] IDENTITY(1,1) NOT NULL,
  9.     [typeID] [INT] NULL,
  10.     [itemID] [INT] NULL,
  11.     [VALUE] [FLOAT] NULL,
  12.     [modified] [datetime] NULL,
  13.  CONSTRAINT [PK_as_like_items] PRIMARY KEY CLUSTERED
  14. (
  15.     [id] ASC
  16. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  17. ) ON [PRIMARY]
  18. GO
  19. /****** Object:  Table [dbo].[as_like_log]    Script Date: 02.07.2021 8:42:08 ******/
  20. SET ANSI_NULLS ON
  21. GO
  22. SET QUOTED_IDENTIFIER ON
  23. GO
  24. CREATE TABLE [dbo].[as_like_log](
  25.     [id] [INT] IDENTITY(1,1) NOT NULL,
  26.     [typeID] [INT] NULL,
  27.     [itemID] [INT] NULL,
  28.     [created] [datetime] NULL,
  29.     [username] [nvarchar](128) NULL,
  30.     [VALUE] [INT] NULL,
  31.  CONSTRAINT [PK_as_like_log] PRIMARY KEY CLUSTERED
  32. (
  33.     [id] ASC
  34. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  35. ) ON [PRIMARY]
  36. GO
  37. /****** Object:  Table [dbo].[as_like_types]    Script Date: 02.07.2021 8:42:08 ******/
  38. SET ANSI_NULLS ON
  39. GO
  40. SET QUOTED_IDENTIFIER ON
  41. GO
  42. CREATE TABLE [dbo].[as_like_types](
  43.     [id] [INT] IDENTITY(1,1) NOT NULL,
  44.     [code] [nvarchar](32) NULL,
  45.     [mode] [nvarchar](20) NULL,
  46.  CONSTRAINT [PK_as_like_types] PRIMARY KEY CLUSTERED
  47. (
  48.     [id] ASC
  49. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  50. ) ON [PRIMARY]
  51. GO
  52. ALTER TABLE [dbo].[as_like_items]  WITH CHECK ADD  CONSTRAINT [FK_as_like_items_as_like_types] FOREIGN KEY([typeID])
  53. REFERENCES [dbo].[as_like_types] ([id])
  54. GO
  55. ALTER TABLE [dbo].[as_like_items] CHECK CONSTRAINT [FK_as_like_items_as_like_types]
  56. GO
  57. ALTER TABLE [dbo].[as_like_log]  WITH CHECK ADD  CONSTRAINT [FK_as_like_log_as_like_types] FOREIGN KEY([typeID])
  58. REFERENCES [dbo].[as_like_types] ([id])
  59. GO
  60. ALTER TABLE [dbo].[as_like_log] CHECK CONSTRAINT [FK_as_like_log_as_like_types]
  61. GO
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement