-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 828: Refactor schema to allow smaller indexes #46
Conversation
using Doctrines Migration
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
============================================
- Coverage 61.15% 57.07% -4.09%
+ Complexity 146 122 -24
============================================
Files 8 5 -3
Lines 726 636 -90
============================================
- Hits 444 363 -81
+ Misses 282 273 -9
Continue to review full report at Codecov.
|
Sweet! Thanks @DiegoPino. I'll pull it down and give it a try as soon as I can. |
5.6 v/s 5.7 timestamps
Without a working install, I'm not in a position to test right now, but this looks good! One question: Most dbs include |
@ajs6f totally, also timestamp update. This was a quick fix to keep Silex alive. I can do that of course. And sha1 is faster too (but collisions dunno, you have huge collections!) |
Yeah, timestamp is the same way, so to speak. But don't worry about SI's overly-ample collections! We will do locally what we need to do, let's get CLAW ready for the bulk of its audience. (Just FYI, we are hugely concerned about using multiple Drupal apps over one repo API, we must be able to do that, so we will probably need to do some fancy footwork anyway!) |
Yes, you missed a step. i left the table generation as a Symfony console
task( see the “how to test” description of the pull) but it is basically
this
`php bin/console migrations:migrate`
I’m on my phone, away from a computer but that is what triggers the table
creation
Let me know how that goes. Composer auto invocation of that command is
something I would like to do as a second pull, but before I would like to
discuss default behavior in case the table is already there and has values
|
Yeah, I realized that just after I posted. We can adjust the playbook once we ensure this works. |
Tested CentOS last night and Ubuntu w/ the content-model-overhaul this morning. Everything looks good to me. |
@seth-shaw-unlv++ thanks!! I really appreciate all the feedback and quick test. |
GitHub Issue: (Islandora/documentation#828)
What does this Pull Request do?
Refactors Gemini (Fedora/Drupal URI Mapper) to use hash based primary keys (composite) in its DB.
This is still Silex until we move to Symfony.
I also added a Symfony/Console app. using Doctrine's Migrate model to allow Table creation (and keeping track of changes) using console app
What's new?
New DB table schema includes 4 new fields, fedora_hash, drupal_hash, dateCreated and dateUpdated
Totally. Since Gemini is a deal breaker/repo-cms superglue, you need to move your already existing mapped values to this new schema or drop and start from scratch. Manual procedure is quite simple. Just update your schema, then add hashes (sha512) and timestamps (now() is good enough) to existing values
How should this be tested?
Pull or apply patch
run
composer install
inside GeminiMake sure your working and existing config.yaml file is still there and it works
run
php bin/console list
to see available commandsrun
php bin/console migrations:migrate
which will trigger a Migration file. (fancy name for MYSQL SQL!)Migration file was written for MYSQL 5.7, will work on 5.6 too. But if other DBs are used, a new migration schema will have to be generated
Additional Notes:
This was made in a hurry today since I did most of the fun stuff on Symfony4! and is mostly a backport to keep the ball rolling. Backport means i could have forgotten something, please test and give me all the feedback and concern, change requests you want.
If this goes in I will make the ansible pull too, which is really just running
php bin/console migrations:migrate
which by the way could be automatized to run when composer install runs via composer.json file.Interested parties
Tag (@seth-shaw-unlv @ajs6f @DigitLib @dannylamb @Islandora-CLAW/committers)