aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/002_AssetStore.sql')
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_AssetStore.sql29
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql
new file mode 100644
index 0000000..3e24543
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql
@@ -0,0 +1,29 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_assets
4 (
5 id varchar(36) NOT NULL,
6 name varchar(64) NOT NULL,
7 description varchar(64) NOT NULL,
8 assetType tinyint NOT NULL,
9 local bit NOT NULL,
10 temporary bit NOT NULL,
11 data image NOT NULL
12 ) ON [PRIMARY]
13 TEXTIMAGE_ON [PRIMARY]
14
15IF EXISTS(SELECT * FROM assets)
16 EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
17 SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
18
19DROP TABLE assets
20
21EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
22
23ALTER TABLE dbo.assets ADD CONSTRAINT
24 PK__assets__id PRIMARY KEY CLUSTERED
25 (
26 id
27 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
28
29COMMIT