print "Using database ambient"
use ambient
go

print "Creating new seeing_paranal table"
go

Create table seeing_paranal
(
   start_date	 int  not null,
   interval      smallint null,
   fwhm	         smallint  null,
   ra	 	 int      null,
   dec	 	 int      null,
   airmass       tinyint  null,
   tau           smallint null,
   rfl           smallint null,
   tet           smallint null
)
go

print "Creating index on seeing_paranal.start_date column"
go
create unique clustered index seeing_date 
	on seeing_paranal ( start_date ) 
go

print "Granting privileges on seeing_paranal"
go
grant select on seeing_paranal to public
grant insert on seeing_paranal to frameingest
grant all on seeing_paranal to archeso
go

