aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ensured that tests are skipped for wrong conn string, also m_log chngAlexRa2010-05-231-2/+23
| | | | | | | | | | The base test class now tries to connect to DB, ignores all tests in the class if unable to. Also m_log changed to instance field (which in this case shouldn't cause any problems), to avoid having to define it separately in each derived class. Here I touched things that I don't understand well (using log4net), so please review this commit.
* Removed (unused?) empty SQL files from MSSQL resource dirAlexRa2010-05-239-0/+0
| | | | | | There was a whole bunch of these SQL files, all empty and apparently unused. Removing them is just a clean-up, if anybody has a reason for these files to be there, feel free to revert.
* MySQL Migrations: Minor correcton to Region/Estate splitAlexRa2010-05-232-6/+12
| | | | (some Estate SQL left behind in the Region migration)
* MSSQL Migration: CreatorID in InventoryItems changed to VARCHAR(36)AlexRa2010-05-231-0/+70
| | | | Again, the same thing about potentially having non-GUID CreatorID.
* Various minor changes in the data testsAlexRa2010-05-235-16/+18
|
* Further corrections to MS SQL stores (now passes all tests)AlexRa2010-05-232-89/+49
| | | | | | | | | | | Besides, AssetData is slightly optimized to StoreAsset in one request ("IF EXISTS() UPDATE ... ELSE INSERT ...") The main change in the MS SQL Inventory implem. is that it now return empty list (or whatever) when called with UUID.Zero, which is consistent with how the code for other DBs work. I did no changes at all in XInventory, as there is no test set for them.
* Split migrations for RegionStore and EstateStore (see WARNING!)AlexRa2010-05-234-103/+157
| | | | | | | | | | | | ok, so the estate stores now want their own migration files, but as it happened the SQL definition were inside the Region migrations. It seems better/cleaner to keep each 'store' separately updatable. WARNING: any editing in the middle of the migration scripts (as opposite to just appending to them) has the potential of messing up updates of existing databases. As far as I can see, this one is (probably) safe, the worst that could happen is the EstateStore migration silently fail if the estate the tables are already there.
* Unitests: Asset, Estate, Region (the "legacy" one), InventoryAlexRa2010-05-235-173/+137
| | | | | | | | The tests have been modified to work under NUnit 2.4.6 (the one currently used in the project). They will also work with NUnit 2.5+ as is, but will look better if you #define NUNIT25 for them.
* Added MS SQL test conn to INI - only as an example, modify before use!!!AlexRa2010-05-231-4/+21
| | | | | | | NOTE that this INI file is currently loaded as a embedded RESOURCE, which is weird and has a disadvantage of having to rebuild the Tests whenever the conn strings are changed. The only reason is that I couldn't figure out a reliable way to put this INI into the correct dir at runtime. If somebody can do it, that would be cool.
* Removed MySql and SQLite-specific asset test filesAlexRa2010-05-232-156/+0
|
* BasicAssetTest.cs replaced by AssetTests.csAlexRa2010-05-231-0/+161
| | | | | | | | AssetTests: The name has changed to reflect the fact it is no longer a base class, but the complete asset test for all supported databases. The test can also check storing of CreatorID, but the feature is disabled at this commit!
* Bugfix in tests (must clear db before migrations, not after)AlexRa2010-05-233-3/+3
|
* EstateData tests passing on all DBsAlexRa2010-05-231-28/+2
|
* Corrections in RegionTests.cs. It now fully works!AlexRa2010-05-231-48/+75
| | | | | | | | | The problem was that some tests relied on prior tests to leave the DB in a particular state, but the test class cleared the DB every time. The affected tests have been merged into one to remove the dependencies. tested on all 3 Dbs, all tests green.
* Minor corrections in BasicDataServiceTest.csAlexRa2010-05-231-0/+41
| | | | | (added more functions for cleaning up DB from the derived tests)
* MSSQL: added asset_flags, CreatorID to migrationsAlexRa2010-05-231-0/+6
|
* MSSQLAssetData updated to support [CreatorID], [asset_flags]AlexRa2010-05-231-5/+11
|
* MSSQLAssetData: fixed some weirdnessAlexRa2010-05-231-7/+12
| | | | | | | | Fixed unfinished SQL in FetchAssetMetadataSet, fixed SQL in UpdateAsset (must not modify ID). NOT tested! But apparently shouldn't work worse than the previous version, esp. the FetchMetadata thing.
* All data tests made DBMS-independentAlexRa2010-05-2310-610/+160
|
* Added generic base classes for testing database servicesAlexRa2010-05-233-0/+241
| | | | | | | | | | These are some generic classes that simplify writing tests for any of the data connectors and databases. Among other things, configuring the connection strings is done once, in a separate resource file. Tests based on the new BasicDataServiceTest class require NUnit 2.5 or better.
* Cleaned up MySql migrations a bit more, got rid of all old-form migration ↵Diva Canto2010-05-205-32/+8
| | | | files. Restored Presence table to its taboo-breaking form.
* Revert one of the previous patches' hunks. The new code looked better, butMelanie2010-05-201-3/+10
| | | | was less efficient.
* Series of patches to include creator ID in assets.AlexRa2010-05-201-4/+35
| | | | | | | | | | | | | | Contains a migration. SQLite: May contain nuts. The SQLite migration copies the entire asset table. Be prepared for quite a wait. Don't interrupt it. Back up your assets db. BasicAssetTest checks CreatorID storage, new test for weird CreatorID (now also checks that non-GUID or empty CreatorID gets stored correctly) Signed-off-by: Melanie <melanie@t-data.com>
* Scrambled asset type in BasicAssetTest.cs!AlexRa2010-05-191-9/+10
| | | | | | | | | The asset type wasn't in the list of "DontScramble" fields, so the test assets were stored with randomized type, which caused exception on reading them. Also the scrambler was moved from local var to the class level, so it could be used in the new tests I've added (see the next commit).
* MySQLAssetData.cs now supports asset_flags, CreatorIDAlexRa2010-05-191-5/+7
|
* MySQL: added CreatorID, moved asset_flag to migration scriptAlexRa2010-05-191-0/+8
|
* SQLite: CreatorID added (and asset_flags moved) to the migration scriptAlexRa2010-05-191-0/+24
|
* Added CreatorID to SQLite asset dataAlexRa2010-05-191-15/+27
|
* A bit of harmless refactoring in SQLiteAssetData.csAlexRa2010-05-191-10/+3
|
* Kind of fixed Melanie's "Exception(sql)" correctionAlexRa2010-05-191-2/+2
| | | | | | | Throwing an Ex. with SQL command in the message looks weird, this is a bit better, but I'm still not sure if that's the proper way to handle. Also, there is a catch one level up, so is this one necessary?
* Change appender to deal with line feeds more intelligently.Melanie2010-05-191-1/+1
| | | | | | | Change migration error reporting to not truncate the statement when reporting. It's a bit messier than the old error reporting, but at least one gets an idea of what could be wrong again. And things look a lot neater now.
* Clean up output a bitMelanie2010-05-192-8/+11
|
* Fix the migration message to say "Continuing" again. Remove line feed, whichMelanie2010-05-191-1/+1
| | | | prevented the full message from displaying.
* Remove the return that was inserted in the last merge to allowMelanie2010-05-191-1/+0
| | | | migrations to continue in the face of an error
* Revert "Allow migration steps to fail again without bringing down the house"Melanie2010-05-191-1/+1
| | | | This reverts commit 167db502593de5f535d8c322005c63ef263940ed.
* Allow migration steps to fail again without bringing down the houseMelanie2010-05-191-1/+1
|
* Merge commit 'alex/mssql-estate-bugfix'Melanie2010-05-181-49/+41
|\ | | | | | | | | | | | | This fixes some type conversion bugs and also makes the estate lists work properly for MSSQL. Strawberry, please check this. Signed-off-by: Melanie <melanie@t-data.com>
| * Massive bugfix in MSSQLEstateData (now works!)AlexRa2010-05-181-49/+41
| |
* | Make m_log in migrations private. Define new m_log in derived classMelanie2010-05-182-1/+3
| |
* | Binary Guids are 16 chars long. Fix parser.Melanie2010-05-181-1/+1
| |
* | Some more corrections after MySQL connector updateAlexRa2010-05-192-2/+3
| |
* | All (?) MySQL stores fixed to use DBGuid.FromDB()AlexRa2010-05-195-92/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | This was needed if we want to update to the latest MySQL connector dll. It automatically converts CHAR(36) to Guids, so getting them as strings no longer works. By using DBGuid.FromDB(), we unlink from any particular storage format of GUIDs, could even make them BINARY(16) if we like. Actually not all MySql units are touched, but the remaining ones don't seem to be affected (they don't read GUIDs from DB)
* | Added DBGuids.cs (static func DBGuid.FromDB()AlexRa2010-05-191-0/+44
| | | | | | | | | | | | | | | | This DBMS-independent function to be used converting UUIDs from whatever format used in the DB (string/binary/Guid). This is mostly needed for MySQL, as in MSSQL they are always UNIQUEIDENTIFIERs and in SQLite always strings (but would look better if we use it there anyway).
* | MS SQL migrations converted to the new formatAlexRa2010-05-1677-2008/+2273
| |
* | Migrations for SQLite converted to new formatAlexRa2010-05-1646-709/+828
| |
* | Converted MySQL migration history to the new formatAlexRa2010-05-1679-1008/+1228
| | | | | | | | | | Replaced all NNN_StoreName.sql migration resources with a more readable, single-file-per-store
* | Added MySqlMigrations.cs (supports stored proc/funcs)AlexRa2010-05-161-0/+85
| | | | | | | | | | Uses MySqlScript class to correctly run proc/func definitions that need delimiter change. Requires MySql.Data.dll 6.2 or later.
* | Migration.cs supports single-file migration history formatAlexRa2010-05-161-104/+233
|/ | | | | | | | | | Scans for migration resources in either old-style "scattered" (one file per version) or new-style "integrated" format (single file "Resources/{StoreName}.migrations[.nnn]") with ":VERSION nnn" sections). In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script that must be sent to the server separately. The old-style migrations are loaded each in one piece and don't support the ':GO' feature. Status: TESTED and works fine in all modes!
* OK, this really fixes it, I promise.Diva Canto2010-05-091-2/+2
|
* Yey for unit tests. The previous commit had a couple of bugs on SQL ↵Diva Canto2010-05-092-3/+3
| | | | statements. Fixed here.