-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateDatabase.sql
More file actions
44 lines (37 loc) · 904 Bytes
/
CreateDatabase.sql
File metadata and controls
44 lines (37 loc) · 904 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
drop table if exists Bid;
drop table if exists BidToAuction;
drop table if exists Auction;
drop database if exists SkyAuctionsDB;
create database SkyAuctionsDB;
use SkyAuctionsDB;
create table Bid(
ID int primary key not null IDENTITY(1,1),
ProfileID varchar(255),
Bidder varchar(255),
Timestamp datetime2,
BidAmount int
)
create table BidToAuction(
BidID int,
AuctionID varchar(255),
primary key (BidID, AuctionID)
)
create table Auction(
BIN bit,
UUID varchar(255) primary key,
Auctioneer varchar(255),
ProfileID varchar(255),
StartDate DateTime2,
EndDate DateTime2,
ItemName varchar(255),
ItemLore varchar(2555),
Extra varchar(1000),
Category varchar(155),
Tier varchar(155),
StartingBid int,
ItemBytes varchar(2555),
Claimed bit,
ClaimedBidders varchar(255),
HighestBidAmount int,
)
create unique index AuctionUUID on Auction(uuid);