diff options
author | Justin Clarke Casey | 2008-07-02 16:20:54 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-07-02 16:20:54 +0000 |
commit | 9052c43319ab69f57b80e363d965780be625b0e2 (patch) | |
tree | 3e17e9c0908be54ecb01ddff824d6c1a32020e88 /OpenSim/Data/MSSQL/MSSQLAssetData.cs | |
parent | Mantis#1647. Thank you kindly, Sempuki for a patch that: (diff) | |
download | opensim-SC_OLD-9052c43319ab69f57b80e363d965780be625b0e2.zip opensim-SC_OLD-9052c43319ab69f57b80e363d965780be625b0e2.tar.gz opensim-SC_OLD-9052c43319ab69f57b80e363d965780be625b0e2.tar.bz2 opensim-SC_OLD-9052c43319ab69f57b80e363d965780be625b0e2.tar.xz |
* Drop InvType from the assets table since it is no longer used
* Migration should be automatic on sqlite and mysql
* Migration is not automatic on mssql, you will need to drop the invType column manually
* Migration should be fine, but as for any db change, I would recommend making sure you have backups before moving past this revision
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLAssetData.cs')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 44d78ed..3f2e8a7 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -63,6 +63,7 @@ namespace OpenSim.Data.MSSQL | |||
63 | database.ExecuteResourceSql("CreateAssetsTable.sql"); | 63 | database.ExecuteResourceSql("CreateAssetsTable.sql"); |
64 | return; | 64 | return; |
65 | } | 65 | } |
66 | |||
66 | } | 67 | } |
67 | 68 | ||
68 | /// <summary> | 69 | /// <summary> |
@@ -114,9 +115,9 @@ namespace OpenSim.Data.MSSQL | |||
114 | 115 | ||
115 | SqlCommand cmd = | 116 | SqlCommand cmd = |
116 | new SqlCommand( | 117 | new SqlCommand( |
117 | "INSERT INTO assets ([id], [name], [description], [assetType], [invType], [local], [temporary], [data])" + | 118 | "INSERT INTO assets ([id], [name], [description], [assetType], [local], [temporary], [data])" + |
118 | " VALUES " + | 119 | " VALUES " + |
119 | "(@id, @name, @description, @assetType, @invType, @local, @temporary, @data)", | 120 | "(@id, @name, @description, @assetType, @local, @temporary, @data)", |
120 | database.getConnection()); | 121 | database.getConnection()); |
121 | 122 | ||
122 | using (cmd) | 123 | using (cmd) |
@@ -128,8 +129,6 @@ namespace OpenSim.Data.MSSQL | |||
128 | cmd.Parameters.AddWithValue("description", asset.Description); | 129 | cmd.Parameters.AddWithValue("description", asset.Description); |
129 | SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt); | 130 | SqlParameter e = cmd.Parameters.Add("assetType", SqlDbType.TinyInt); |
130 | e.Value = asset.Type; | 131 | e.Value = asset.Type; |
131 | SqlParameter f = cmd.Parameters.Add("invType", SqlDbType.TinyInt); | ||
132 | f.Value = asset.InvType; | ||
133 | SqlParameter g = cmd.Parameters.Add("local", SqlDbType.TinyInt); | 132 | SqlParameter g = cmd.Parameters.Add("local", SqlDbType.TinyInt); |
134 | g.Value = asset.Local; | 133 | g.Value = asset.Local; |
135 | SqlParameter h = cmd.Parameters.Add("temporary", SqlDbType.TinyInt); | 134 | SqlParameter h = cmd.Parameters.Add("temporary", SqlDbType.TinyInt); |
@@ -159,7 +158,6 @@ namespace OpenSim.Data.MSSQL | |||
159 | "name = @name, " + | 158 | "name = @name, " + |
160 | "description = @description," + | 159 | "description = @description," + |
161 | "assetType = @assetType," + | 160 | "assetType = @assetType," + |
162 | "invType = @invType," + | ||
163 | "local = @local," + | 161 | "local = @local," + |
164 | "temporary = @temporary," + | 162 | "temporary = @temporary," + |
165 | "data = @data where " + | 163 | "data = @data where " + |
@@ -168,7 +166,6 @@ namespace OpenSim.Data.MSSQL | |||
168 | SqlParameter param2 = new SqlParameter("@name", asset.Name); | 166 | SqlParameter param2 = new SqlParameter("@name", asset.Name); |
169 | SqlParameter param3 = new SqlParameter("@description", asset.Description); | 167 | SqlParameter param3 = new SqlParameter("@description", asset.Description); |
170 | SqlParameter param4 = new SqlParameter("@assetType", asset.Type); | 168 | SqlParameter param4 = new SqlParameter("@assetType", asset.Type); |
171 | SqlParameter param5 = new SqlParameter("@invType", asset.InvType); | ||
172 | SqlParameter param6 = new SqlParameter("@local", asset.Local); | 169 | SqlParameter param6 = new SqlParameter("@local", asset.Local); |
173 | SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary); | 170 | SqlParameter param7 = new SqlParameter("@temporary", asset.Temporary); |
174 | SqlParameter param8 = new SqlParameter("@data", asset.Data); | 171 | SqlParameter param8 = new SqlParameter("@data", asset.Data); |
@@ -177,7 +174,6 @@ namespace OpenSim.Data.MSSQL | |||
177 | command.Parameters.Add(param2); | 174 | command.Parameters.Add(param2); |
178 | command.Parameters.Add(param3); | 175 | command.Parameters.Add(param3); |
179 | command.Parameters.Add(param4); | 176 | command.Parameters.Add(param4); |
180 | command.Parameters.Add(param5); | ||
181 | command.Parameters.Add(param6); | 177 | command.Parameters.Add(param6); |
182 | command.Parameters.Add(param7); | 178 | command.Parameters.Add(param7); |
183 | command.Parameters.Add(param8); | 179 | command.Parameters.Add(param8); |