File: cricket.sql

package info (click to toggle)
cricket 1.0.5-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,480 kB
  • ctags: 390
  • sloc: perl: 8,287; sh: 920; ansic: 318; makefile: 62; sql: 16
file content (30 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* This will create a table for use in storing Cricket data. This must be run
 * in a database called 'cricket' for the collector script to run properly.
 * 
 * Set it up with your own size parameters. Cricket doesn't insert a large
 * amount of data and this is really only good for warehousing as there is
 * no kind of calculations or interpolation done - data is simply dumped from
 * Cricket into the DB.
 *
 * This will work with Microsoft SQLServer. I do not know if it'll work with 
 * Sybase or any other type of database. If you have a version for another DB
 * please submit a patch so we can integrate it.
 */

CREATE TABLE [dbo].[CricketData] (
	[targetPath] [varchar] (256) NOT NULL ,
	[targetName] [varchar] (256) NOT NULL ,
	[ds] [int] NOT NULL ,
	[value] [int] NOT NULL ,
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[TimeStamp] [datetime] NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[CricketData] WITH NOCHECK ADD
	CONSTRAINT [IX_CricketData] UNIQUE NONCLUSTERED
	(
		[TimeStamp],
		[ds],
	) ON [PRIMARY]
GO