aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
blob: 6084886d12a572812c05dc8ae8b229b54f1b7976 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
CREATE TABLE UserAgents (
  ProfileID VARCHAR(36) NOT NULL,
  AgentIP VARCHAR(24) DEFAULT NULL,
  AgentPort INT DEFAULT NULL,
  AgentOnline BIT DEFAULT NULL,
  SessionID VARCHAR(36) DEFAULT NULL,
  SecureSessionID VARCHAR(36) DEFAULT NULL,
  InitialRegion VARCHAR(255) DEFAULT NULL,
  Region VARCHAR(255) DEFAULT NULL,
  LoginTime INT DEFAULT NULL,
  LogoutTime INT DEFAULT NULL,
  Handle BIGINT DEFAULT NULL,
  PositionX DOUBLE DEFAULT NULL,
  PositionY DOUBLE DEFAULT NULL,
  PositionZ DOUBLE DEFAULT NULL,
  LookAtX DOUBLE DEFAULT NULL,
  LookAtY DOUBLE DEFAULT NULL,
  LookAtZ DOUBLE DEFAULT NULL,  
  PRIMARY KEY (ProfileID)
);

CREATE TABLE UserProfiles (
  ID VARCHAR(36) NOT NULL,
  WebLoginKey VARCHAR(36) DEFAULT NULL,
  FirstName VARCHAR(32) DEFAULT NULL,
  SurName VARCHAR(32) DEFAULT NULL,
  Email VARCHAR(250) DEFAULT NULL,
  PasswordHash VARCHAR(32) DEFAULT NULL,
  PasswordSalt VARCHAR(32) DEFAULT NULL,
  HomeRegionID VARCHAR(36) DEFAULT NULL,
  HomeRegionX INT DEFAULT NULL,
  HomeRegionY INT DEFAULT NULL,
  HomeLocationX DOUBLE DEFAULT NULL,
  HomeLocationY DOUBLE DEFAULT NULL,
  HomeLocationZ DOUBLE DEFAULT NULL,
  HomeLookAtX DOUBLE DEFAULT NULL,
  HomeLookAtY DOUBLE DEFAULT NULL,
  HomeLookAtZ DOUBLE DEFAULT NULL,
  Created INT DEFAULT NULL,
  LastLogin INT DEFAULT NULL,
  UserInventoryURI VARCHAR(255) DEFAULT NULL,
  UserAssetURI VARCHAR(255) DEFAULT NULL,
  Image VARCHAR(36) DEFAULT NULL,
  FirstLifeImage VARCHAR(36) DEFAULT NULL,
  AboutText TEXT DEFAULT NULL,
  FirstLifeAboutText TEXT DEFAULT NULL,
  CanDoMask INT DEFAULT NULL,
  WantDoMask INT DEFAULT NULL,
  UserFlags INT DEFAULT NULL,
  GodLevel INT DEFAULT NULL,  
  CustomType VARCHAR(32) DEFAULT NULL,
  Partner VARCHAR(36) DEFAULT NULL,
  RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
  PRIMARY KEY (ID)
);

CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);

CREATE TABLE UserAppearances (
  Owner VARCHAR(36) NOT NULL,
  BodyItem VARCHAR(36) DEFAULT NULL,
  BodyAsset VARCHAR(36) DEFAULT NULL,
  SkinItem VARCHAR(36) DEFAULT NULL,
  SkinAsset VARCHAR(36) DEFAULT NULL,
  HairItem VARCHAR(36) DEFAULT NULL,
  HairAsset VARCHAR(36) DEFAULT NULL,
  EyesItem VARCHAR(36) DEFAULT NULL,
  EyesAsset VARCHAR(36) DEFAULT NULL,
  ShirtItem VARCHAR(36) DEFAULT NULL,
  ShirtAsset VARCHAR(36) DEFAULT NULL,
  PantsItem VARCHAR(36) DEFAULT NULL,
  PantsAsset VARCHAR(36) DEFAULT NULL,
  ShoesItem VARCHAR(36) DEFAULT NULL,
  ShoesAsset VARCHAR(36) DEFAULT NULL,
  SocksItem VARCHAR(36) DEFAULT NULL,
  SocksAsset VARCHAR(36) DEFAULT NULL,
  JacketItem VARCHAR(36) DEFAULT NULL,
  JacketAsset VARCHAR(36) DEFAULT NULL,
  GlovesItem VARCHAR(36) DEFAULT NULL,
  GlovesAsset VARCHAR(36) DEFAULT NULL,
  UnderShirtItem VARCHAR(36) DEFAULT NULL,
  UnderShirtAsset VARCHAR(36) DEFAULT NULL,
  UnderPantsItem VARCHAR(36) DEFAULT NULL,
  UnderPantsAsset VARCHAR(36) DEFAULT NULL,
  SkirtItem VARCHAR(36) DEFAULT NULL,
  SkirtAsset VARCHAR(36) DEFAULT NULL,
  Texture BLOB,
  VisualParams BLOB,
  Serial INT DEFAULT NULL,
  AvatarHeight FLOAT DEFAULT NULL,    
  PRIMARY KEY (Owner)
);

CREATE TABLE UserFriends (
  UserFriendID VARCHAR(36) NOT NULL,
  OwnerID VARCHAR(36) DEFAULT NULL,
  FriendID VARCHAR(36) DEFAULT NULL,
  FriendPermissions INT DEFAULT NULL,
  PRIMARY KEY (UserFriendID)  
);

CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);