diff options
author | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
commit | 281955949910eb257b5f7e42e54535ba7812418e (patch) | |
tree | 8c62c0006f2567983a686e811513c8c009061aac /OpenSim/Data/MSSQL/Resources/002_AssetStore.sql | |
parent | * Converted a number of methods within the login processes from private to pr... (diff) | |
download | opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.zip opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.gz opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.bz2 opensim-SC-281955949910eb257b5f7e42e54535ba7812418e.tar.xz |
Mantis #2124
Thank you, RuudL, for a patch that brings MSSQL up to the same
implementation level as MySQL.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_AssetStore.sql | 29 |
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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE 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 | |||
15 | IF 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 | |||
19 | DROP TABLE assets | ||
20 | |||
21 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
22 | |||
23 | ALTER 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 | |||
29 | COMMIT | ||