Dean Herbert
e82ad3539b
Move JsonIgnore specification to interface
2018-11-30 16:39:25 +09:00
Dean Herbert
705ef5e3ac
Fix hash function
2018-11-30 15:10:56 +09:00
smoogipoo
a88b69ec43
Notify of existing imports
2018-11-28 20:19:35 +09:00
Dean Herbert
ab2b2493a1
Move hashing functionality to ArchiveModelManager
2018-11-28 19:21:36 +09:00
Dean Herbert
0384f3549f
Add hash and missing indices to SkinInfo
2018-11-28 19:15:56 +09:00
Dean Herbert
ce660b6d67
Add skin de-duplication
2018-11-28 19:01:22 +09:00
smoogipoo
542a75d076
Add index on online score id
2018-11-28 18:56:20 +09:00
smoogipoo
219929eb47
Score -> ScoreInfo
2018-11-28 18:33:01 +09:00
smoogipoo
4ba7690e04
Initial scoremanager/scorestore structure
2018-11-28 16:50:16 +09:00
smoogipoo
a783fdb501
Add LegacyFileArchiveReader
...
Treats files as "archives" for import.
2018-11-28 16:13:16 +09:00
smoogipoo
0982508d26
Rename to LegacyDirectoryArchiveReader
2018-11-28 15:13:27 +09:00
smoogipoo
dc31736db7
Add explicit foreign key property to INamedFileInfo
2018-11-28 13:45:56 +09:00
smoogipoo
14ff4bc26a
Move primary key attribute to IHasPrimaryKey
2018-11-28 13:19:23 +09:00
smoogipoo
c5d2dc2f6a
Remove unnecessary newline
2018-11-28 13:05:17 +09:00
HoLLy
db443babb6
Fix database entries using platform-specific path separator
2018-10-07 19:15:42 +02:00
Dan Balasescu
e71e871d1f
Remove unnecessary comment
2018-09-26 18:41:55 +09:00
Paul Teng
f01dfc2860
Merge branch 'master' into patch-1
2018-09-20 23:45:44 -04:00
Paul Teng
eaf7697b85
Add boolean return value
2018-09-20 23:21:27 -04:00
Dean Herbert
293a5dd099
Use string interpolation
2018-09-21 11:50:36 +09:00
Paul Teng
52877eca83
Update ArchiveModelManager.cs
2018-09-20 20:01:04 -04:00
Paul Teng
8bfd981a50
Handle directory checking before entering task
2018-09-17 21:05:28 -04:00
Paul Teng
d469748612
Reformat code
2018-09-15 09:53:59 -04:00
Paul Teng
42b2c32222
Catch directory not found exception
2018-09-15 09:47:50 -04:00
Dean Herbert
55372496d1
Fix thread-safety of queued events list in ArchiveModelManager
2018-09-09 22:37:15 +09:00
Dean Herbert
bb67f1a361
Merge remote-tracking branch 'upstream/master' into add-skin-import-delete
2018-09-07 18:18:03 +09:00
Dean Herbert
168dbe9329
Fix error notification
2018-09-07 18:14:23 +09:00
Dean Herbert
2c0ba401d5
Add ability to click on imported complete notification to present last import
2018-09-07 16:30:11 +09:00
Dean Herbert
e67f63eab6
Improve import progress messaging
2018-09-03 10:10:04 +09:00
Dean Herbert
144e80dff6
Add "import all skins from stable" option (and mass delete)
2018-09-03 10:10:04 +09:00
Dean Herbert
5c7ff31675
Add note about null return
2018-08-25 14:51:42 +09:00
smoogipoo
99574ecad8
Softly handle errors when no beatmap file exists in archive
2018-08-24 17:57:39 +09:00
smoogipoo
50b8daf939
Fix threads being cross-disposed from DatabaseContextFactory
2018-08-22 14:07:52 +09:00
smoogipoo
83bda313d1
Output the currently importing model
2018-08-17 13:50:27 +09:00
smoogipoo
767c284793
Fix import not working
2018-08-15 15:49:55 +09:00
Dean Herbert
b38da34da9
Fix resetting database failing due to incorrect disposal logic
2018-07-24 12:13:48 +02:00
Dean Herbert
fc6deb6ab5
Merge remote-tracking branch 'upstream/master' into peppy-fix-model-import
2018-07-20 16:42:46 +09:00
Dean Herbert
0c24244340
Remove SingletonContextFactory
...
It is dangerous to use this as it doesn't correctly handle contexts and can cause issues that will never actually arise in normal execution.
# Conflicts:
# osu.Game/Database/SingletonContextFactory.cs
2018-07-18 16:50:56 +09:00
Dean Herbert
e3fb781a5a
Fix ArchiveModelManager's model import method not running import logic
2018-07-18 12:59:22 +09:00
Dean Herbert
4a19f22b3d
Remove custom migration exception
...
This was hiding the true error message from ever hitting logs.
Made to help disagnose #2711 .
2018-06-15 13:38:42 +09:00
Dan Balasescu
b59c45ca57
Merge branch 'master' into fix-database-migration-failure
2018-06-06 22:44:35 +09:00
Dean Herbert
a60c888ae5
Add comment about reasoning for local context variable
2018-06-06 22:05:25 +09:00
Dean Herbert
3b03a25ea5
Fix beatmaps with subfolders importing incorrectly on windows
...
Closes #2718 .
2018-06-05 11:36:44 +09:00
Dean Herbert
3a823d6c25
Fix multiple issues causing database reset to fail
2018-06-04 02:12:16 +09:00
smoogipoo
9da7bfd615
Merge remote-tracking branch 'origin/master' into fix-beatmap-import-conflicts
...
# Conflicts:
# osu.Game/Database/ArchiveModelManager.cs
2018-05-31 14:02:52 +09:00
Dean Herbert
eb89317494
Remove performance optimisation tracking disables to keep things simple for now
2018-05-30 13:43:43 +09:00
Dean Herbert
4a7de043e0
Recycle all contexts on beginning a write operation for the time being
2018-05-30 13:43:25 +09:00
Dean Herbert
e23e2bd348
Fix recycling never being performed due to incorrect ordering
2018-05-30 13:37:52 +09:00
Dean Herbert
31ab6f2408
Fix event flushing sticking on early return
2018-05-29 19:43:52 +09:00
Dean Herbert
4a18951cce
Report full error to log file
2018-05-29 18:37:45 +09:00
Dean Herbert
47d88a48a2
Add logging on import processes
2018-05-29 16:26:42 +09:00
Dean Herbert
de8c4e6d56
Remove unique constraints on hash columns
...
We are going to allow multiple instances of the same beatmap info hash as they could be in different beatmap sets.
2018-05-29 16:26:32 +09:00
Dean Herbert
c1f416b1cc
Add back missing rethrow
2018-05-29 16:23:38 +09:00
Dean Herbert
3d3026a80c
Report any error during import to the write context to allow for rollback
2018-05-29 16:23:38 +09:00
Dean Herbert
72da640059
Change order of event firing in Update calls
...
A remove event should not be fired before the update is successful.
2018-05-29 16:23:38 +09:00
Dean Herbert
80806be047
Don't start transactions for migration
...
It looks like transactions are used internally during migration.
2018-05-29 16:23:38 +09:00
Dean Herbert
a3287b8cf2
Correctly rollback failed imports
2018-05-29 16:23:38 +09:00
Dean Herbert
bcb04f6168
Improve transaction handling flexibility
2018-05-29 16:23:27 +09:00
Dean Herbert
d4e7f08c20
Bring entity framework up-to-date and re-enable transactions
2018-05-29 16:23:27 +09:00
Dean Herbert
2a87b851fa
Add proper transaction rollback logic on exception
2018-05-29 16:23:27 +09:00
Dean Herbert
32a74f95a5
Normalize all the line endings
2018-04-13 18:26:38 +09:00
smoogipoo
b97c4e8b44
Fix all possible cases of crossthread import data races
2018-04-09 12:45:44 +09:00
smoogipoo
5159127bce
Fix SQLite failing to initialize on test projects
2018-03-26 18:07:09 +09:00
Dean Herbert
0e669c9a3f
Fix many warnings
2018-03-24 18:23:22 +09:00
smoogipoo
ffa712dccb
Fix post-merge issues
2018-03-24 15:19:45 +09:00
smoogipoo
c29f7a4333
Merge remote-tracking branch 'origin/master' into netstandard
2018-03-24 14:49:46 +09:00
Dean Herbert
b8022070e8
Merge remote-tracking branch 'upstream/master' into beatmap-as-a-skin
2018-03-22 16:24:56 +09:00
Dean Herbert
9a20839b74
Merge branch 'master' into better-import-notice
2018-03-22 14:57:04 +09:00
smoogipoo
dc9fb84e25
Update progress with the current item, not the next item
...
In the case where there is no next item, the progress will not get updated, so we'll essentially skip one element from filling the progress bar further. In the future we may/will want to not hide the notification upon completion, so this will look better in such scenarios.
2018-03-22 14:46:25 +09:00
Dean Herbert
5104ba8118
Merge branch 'master' into beatmap-as-a-skin
2018-03-22 13:45:30 +09:00
Dean Herbert
101caf3064
Apply same logic fixes to delete/restore all notifications
2018-03-22 11:28:40 +09:00
Dean Herbert
625e561fc8
Fix whitespace
2018-03-20 18:01:09 +09:00
Dean Herbert
dbcf755618
Make Beatmaps parsable as skins
2018-03-20 16:05:29 +09:00
Dean Herbert
f565cc861d
Hard bail on attempting to import an invalid archive format
2018-03-19 20:41:12 +09:00
Dean Herbert
994c7bfabd
Further improvements to messaging
2018-03-19 20:40:14 +09:00
Dean Herbert
18368d2446
Make import notifications fail when any imports fail
2018-03-19 20:18:23 +09:00
Dean Herbert
e9c5834387
Add query method for now
2018-02-23 13:26:01 +09:00
Dean Herbert
402d71a8d9
Add user skin setting storage
2018-02-22 16:29:05 +09:00
Dean Herbert
4c14b32783
Add basic skin database model layout and importing
2018-02-22 15:46:11 +09:00
Dean Herbert
57e61b0b0e
Update xmldoc
2018-02-19 14:50:42 +09:00
Dean Herbert
8b89735e9e
Improve xmldoc for DatabaseContextFactory.Get
2018-02-19 14:17:41 +09:00
Dean Herbert
fa05822d7d
Add missing licence headers
2018-02-15 16:33:33 +09:00
Dean Herbert
b9ef32b09b
Further xmldoc and restoring of Cleanup method
2018-02-15 16:31:42 +09:00
Dean Herbert
1b13be1372
Cleanups and xmldoc additions
2018-02-15 16:24:14 +09:00
Dean Herbert
89cf794f98
Add a lower level ConsumableItems implementation
2018-02-15 16:15:40 +09:00
Dean Herbert
671475f3b4
Ensure undeleted items are populated with includes before firing events
2018-02-15 16:15:40 +09:00
Dean Herbert
e51450a064
Fix query construction
2018-02-15 15:24:28 +09:00
Dean Herbert
fe5df663be
Add more xmldoc
2018-02-15 15:14:46 +09:00
Dean Herbert
a0a65abcac
Crentalise all import logic
2018-02-15 14:22:39 +09:00
Dean Herbert
d3dd31dadb
Make deletion and purging logic even more global
2018-02-15 14:22:39 +09:00
Dean Herbert
d340509b1d
Move ArchiveReaders to a more global namespace
...
Also moves delete and action logic to a shared implementation
2018-02-15 14:22:39 +09:00
Dean Herbert
6ff63c2f0c
Move deletion to ArchiveModelImportManager
2018-02-15 14:22:39 +09:00
Dean Herbert
e0d28564d0
Move import logic to shared implementation
2018-02-15 14:22:39 +09:00
Dean Herbert
50cdb03cd9
Don't dispose read contexts
2018-02-13 15:08:45 +09:00
Dean Herbert
ab34123ba8
Remove unnecessary class variable
2018-02-13 15:05:19 +09:00
Dean Herbert
a738664167
Add interface for database context factory
2018-02-12 23:10:05 +09:00
Dean Herbert
64cda9fd0f
Remove incorrect assert assumption
2018-02-12 22:16:09 +09:00
Dean Herbert
8b37fde15b
Only write when writes occur
...
Also add finaliser logic for safety. Also better threading. Also more cleanup.
2018-02-12 19:57:21 +09:00
Dean Herbert
edc3638175
DatabaseWriteUsage
2018-02-12 17:55:11 +09:00
Dean Herbert
e54de0c267
Remove sqlite-net migration
...
Anyone that may have benefited from this already has.
2018-02-12 15:25:09 +09:00
smoogipoo
b500b76407
Merge branch 'master' into update-branch
2018-02-08 23:35:48 +09:00
Dean Herbert
03154dbc63
Fix incorrect initial migration
...
Also adds variant to settings
2018-01-25 23:41:03 +09:00
Dean Herbert
5a00ae36d1
Add database-based configuration for rulesets
2018-01-24 17:45:28 +09:00
Dean Herbert
37d393bca0
Update licence headers
2018-01-05 20:21:19 +09:00
smoogipoo
7a793eaded
Merge master into netstandard
2017-12-27 20:48:53 +09:00
Dean Herbert
d02e1ae896
Update RulesetInfo and add migration
2017-12-10 12:15:55 +09:00
smoogipoo
267bb75458
Merge remote-tracking branch 'Aergwyn/master' into netstandard
2017-11-29 23:45:29 +09:00
Dean Herbert
85827f83eb
Perform a reload on objects when Refreshing them
...
Previously, it was possible for an object to be "refreshed" with a stale cached state from the current thread's context.
This ensures a check against the database is performed as well.
Resolves #1562 .
2017-11-23 17:04:39 +09:00
smoogipoo
b3bf6e7bee
Merge master into netstandard
2017-11-21 16:39:21 +09:00
smoogipoo
a66edea6dc
Move sqlite batteries to osu.Desktop
...
Fixes e_sqlite.dll not being copied to output on Windows
2017-11-21 15:33:05 +09:00
Dean Herbert
7d2bbc50a3
Add unique constraint on OnlineBeatmapID
2017-11-19 01:45:17 +09:00
smoogipoo
04b271cce9
Migrate osu.Game project to VS2017 project structure
2017-10-30 22:24:11 +09:00
Dean Herbert
ead3ca1f27
Merge branch 'master' into fix-threaded-context-issues
2017-10-25 23:42:08 +09:00
Dean Herbert
6f7ba55f80
Fill out xmldoc
2017-10-25 22:19:47 +09:00
Dean Herbert
c1d133977e
FirstOrDefault -> SingleOrDefault
2017-10-25 22:17:17 +09:00
Dean Herbert
5001e9f264
Fix Hide/Restore/Delete etc.
2017-10-25 22:08:34 +09:00
Dean Herbert
8452e315f4
Allow "refreshing" instances via DatabaseBackedStore
2017-10-25 22:06:25 +09:00
Dean Herbert
487b888f4f
Add missing database indices
...
Also add missing unique constraints where applicable.
2017-10-25 22:05:10 +09:00
Dan Balasescu
05e1a7a5f8
Merge branch 'master' into online-beatmap-id-sanity
2017-10-25 21:38:33 +09:00
TocoToucan
5107489cda
Remove DatabaseBackedStore Reset functions
2017-10-25 15:12:14 +03:00
TocoToucan
63fe569afa
Remove DatabaseBackedStore Prepare functions
2017-10-25 14:53:20 +03:00
Dean Herbert
66f1d2fb2e
Ensure all parsed "Online" IDs are above zero or null
...
Some .osu file sources (or database sources) may be in a bad state. We want to get these ones right as they cannot be enforced by the database itself (via FKs or constraints).
2017-10-25 14:34:39 +09:00
Dean Herbert
22b3f5dd19
Merge remote-tracking branch 'upstream/master' into import-test-fixes
2017-10-23 22:03:37 +09:00
Dean Herbert
dc9c474033
Move all TestCases to Testing project
...
This allows tests to successfully retrieve rulesets, as they are referenced.
2017-10-23 19:32:02 +09:00
Dean Herbert
1a3debc91d
Ensure thread safety on shared contexts
...
Let's call this one temporary.
2017-10-23 17:56:04 +09:00
Dean Herbert
df20845fbb
Share one context per file store for performance reasons
...
There is now a CreateContext method for retrieving a stand-alone context for threaded use.
We may want to add safety against this context being disposed (or just return a fresh one if it is).
2017-10-23 16:35:35 +09:00
Dean Herbert
4a68dd88cb
Centralise BeginTransaction and disable transaction use for now
2017-10-23 14:53:13 +09:00
Dean Herbert
61c1dd3636
Don't output database logs unless DEBUG_DATABASE is specified compile-time
2017-10-22 19:46:08 +09:00
Dean Herbert
1514d8451e
Use a more elegant method of setting the connection timeout
2017-10-22 16:20:04 +09:00
Dean Herbert
29fcd210aa
Centralise transaction committing
2017-10-22 16:17:40 +09:00
Dean Herbert
39b356880e
Fix typo
2017-10-22 15:32:47 +09:00
Dean Herbert
6818ebdaff
Change the way migrations are checked for
...
This method allows switching between sqlite-net and EF builds without completely breaking. Note that DB migration still only happens in a forward direction, but this will allow switching back and forth without eventually being unable to start the game.
2017-10-22 15:27:16 +09:00
Dean Herbert
47213d2498
Rely on storage.DeleteDatabase for guaranteed database deletion
...
Relies on https://github.com/ppy/osu-framework/pull/1100 being merged for most effectiveness.
2017-10-21 00:15:02 +09:00
Dean Herbert
d32059a7ba
Ignore include-ignore warnings for now
2017-10-20 09:25:54 +09:00
Dean Herbert
ca78078436
Add more logging output
2017-10-20 08:06:07 +09:00
Dean Herbert
efaf98c5cf
Allow recovery from a very broken database
2017-10-20 00:48:27 +09:00
Dean Herbert
d9fd05a5af
Hidden cannot be null
2017-10-19 23:19:30 +09:00
Dean Herbert
8aea6068ba
Add fallback logic for the case where previous database can't be migrated
2017-10-19 21:37:09 +09:00
Dean Herbert
1672e0d6b6
Add fallback logic in case migration fails
...
Nuke it all.
2017-10-19 21:11:43 +09:00
Dean Herbert
1fbbee14e4
Allow migration from sqlite-net to EF
...
Bonus stage
2017-10-19 20:04:59 +09:00
Dean Herbert
f7d0df1743
Fix beatmap difficulty and metadata deletion
2017-10-19 17:50:46 +09:00
Dean Herbert
b02dd196f6
Don't make one factory each context
...
A factory is supposed to be re-used.
2017-10-19 17:29:39 +09:00
Dean Herbert
36c00577af
Reduce database log output
...
Also hard-disables it for uninteresting log levels, providing a further performance boost.
2017-10-19 16:35:06 +09:00
Dean Herbert
5d5ea5fb2e
Fix all remaining db structure issues
2017-10-19 14:05:11 +09:00
Dean Herbert
4e8019b313
Add some more missing indices
2017-10-17 19:59:22 +09:00
Dean Herbert
e4a066dc5f
Run cleanup tasks only on startup via manual calls
2017-10-17 19:58:33 +09:00
Dean Herbert
b9d0fb96ed
Fix cascade deletions
2017-10-17 18:26:28 +09:00
Dean Herbert
12639c6819
Use a different database name for now to avoid conflicts when switching versions
2017-10-17 17:52:20 +09:00
Dean Herbert
3e415e3269
Fix tooling failures
2017-10-17 17:52:02 +09:00
Dean Herbert
0177fcbe5f
Fix xmldoc
2017-10-17 17:08:47 +09:00
Dean Herbert
ad54ca9268
Fix TestCasePlaySongSelect
2017-10-17 16:04:54 +09:00