In Rob Conery's post about SubSonic Migrations written in October 2007 he mentions in the 'Left To Do' list that:
I want to be able to “Reverse
Engineer” an existing DB into a
migration file
I am looking at introducing versioning control for an existing database with a lot tables, and SubSonic looks like the tool for me, but I'm not looking forward to writing the first migration by hand! Does anyone know if Rob or anyone got around to writing a tool for doing this automatically?
You could generate a script for the current state of the existing schema and set your first migration to run the script.
Related
I try to upgrade my website from V7 to V8 (then hopefully V9, V10, etc.)
As a first step before I even begin with the actual upgrade process, I try to migrate the obsolete datatypes.
I was reading few articles / answers here and in other places and I try to figure out how to do it manually.
I understand that I can't only change in the back office but also in the database. I was reading some people created scripts but I'm little hesitant to run others scripts on my database, so I was thinking to do it manually .
My question - where in the database I need to make the changes after I change in the Backoffice and what do I need to change?
Does the changes I need to perform are only:
Umbraco.MultipleMediaPicker -> new editor: Umbraco.MediaPicker2
Umbraco.MediaPicker -> new editor: Umbraco.MediaPicker2
Umbraco.ContentPickerAlias -> new editor: Umbraco.ContentPicker2 etc. ?
It means, do I need to find in the DB for example Umbraco.MultipleMediaPicker and rename to Umbraco.MediaPicker2 ?
Please advise.
Thanks.
Bellow a screenshot of my db:
Updating to use the new datatypes is achieved using migrations.
https://www.proworks.com/blog/archive/how-to-upgrade-umbraco-version-7-to-version-8/ - this is a very useful blog post that highlights everything you should need to upgrade from v7 to v8.
https://bitbucket.org/proworks/proworks.umbraco8.migrations/src/master/ - this repo has multiple examples of migrations from the old obsolete datatypes to the new ones. You should be able to add a series of migrations for the datatypes you are interested in/are currently using.
There is far too much code to copy, hence the links. Hopefully these will be helpful.
Important - I would take a backup of your database prior to running any migrations
I'm having an issue on changing data type of a field in Dynamics CRM 2011 On Premise deployment.
In my managed solution, name it "Solution 1", I have a custom field in contact entity: "new_usernumber" of type number (int). I want to change it to string as per new client's requirement (for new users they want to add prefix to it).
I can uninstall the solution and deploy the new "fixed" managed solution, but this requires me to delete the value on my custom fields. Is there any better solution for this?
TIA
There is no easy way to do this. If you don't already have data deployed in the instance using the managed solution I recommend deleting it and importing a corrected managed solution file.
There is no supported or unsupported process of changing the data type(or logical name) of a field without data loss. What you will need to do is add the new field and then write a quick update utility to copy the data from the old field to the new field.
Here is a great article on exactly how to pull off deleting a field in a managed solution. Note, if you are trying to preserve data you'll need to run the update after the step "Import devkeydetDeleteExample_1_1_HOLDING.zip"
Have fun...this is a pain, but certainly doable!
A few months ago I recreated fields in a solution (from double to int). That was a huge mistake. I'm still not sure where things went wrong but they did go wrong. Not only did I lose the date. I managed to introduce errors in the meta-layer so our MVP had to sit dear help me get it running again. He wasn't happy. I wasn't happy. The customer wasn't happy (ex-customer today, mostly because of that).
So, my humble advice - don't do that. Declare a new field instead. If you have usernumber, keep it but start using userNumberString (or userString, userName etc.). My guess is you'll keep your hair longer that way.
And if you manage to succeed, please do tell. :)
YES i know, that you'll never want to use SQL for changing data in Sharepoint.
I have a lot of files in my Sharepoint record center.
I have one corrupted file that i can't delete.
I tried to delete with a solution, with powershell etc, so my last option is delete is from the database.
It's a test envirioment where i want it to use.
SQL is my last chance.......
Have you tried the SPContentDatabase.Repair method?
You haven't stated what you attempted to do in your solution, Powershell script etc. You might get other suggestions that might be less of a threat to your environment.
All your items live in "AllUserData" table. It is, by the way, documented in MSDN: http://msdn.microsoft.com/en-us/library/dd358229(v=prot.13).aspx (surprise for me)
However, you will need the site id and list id of your item.
I noticed that sitecore has the option of exporting users in an Excel format.
I need to have similar functionality for exporting 'participations', (a users can enlist to take part in an 'event', and if their entry is approved via a sitecore workflow, a 'participation' item is created in the content tree)
Since mostly everything in Sitecore is in essence based on items, and I want to export items to Excel, my question is - what are some of the best ways of doing this?
Questions:
Is there a way to re-use this functionality for regular items?
Would it be a good idea to create a custom admin page (any tips on doing this?) which has some custom code that reads the items from the database using the API?
are there sitecore plugins/shared source projects that can help me achieve this?
Or does anyone have a better idea? - would it be better to just store the participations in SQL? I'm mostly doing it this way because I want to make use of the 'free' functionality offers, for example workflow, but if that leads to me using anti-patterns please shoot me ;)
Link is different now: https://marketplace.sitecore.net/en/Modules/Advanced_System_Reporter.aspx
P.S. Couldn't leave a comment to original answer as I don't have enough reputation. Oh well :)
Found a most excellent shared source module which does exactly this (and much more)!
Basically it allows you to configure (and easily extend, if you need to) any kind of table based report on 'items'.
The report module shows up as an application in the sitecore menu (like the user manager tool) and comes with features such as xml,csv, xls export. It's also really easy to set up, once you get the hang of it.
http://trac.sitecore.net/AdvancedSystemReporter
where do I access the comment field for a core data model to add the "xmod" for mogenerator?
hopefully not too dumb a question - but I just can't see where in my existing Xcode 4 model (*.xcdatamodel) to put the "xmod" to get mogenerator working
(reference https://github.com/rentzsch/mogenerator )
Xmo'd currently doesn't work with Xcode4. It is a .pbplugin and Apple removed support for them in Xcode4. There was a couple guys working on a new way of doing it, but I haven't seen any updates in awhile on it.
You can still use the AppleScript and command line though. You just have to manually trigger it and add the files. You lose the automation that Xmo'd gave you. Also, Xmo'd still works in Xcode3. So you can switch over to it when doing your modeling if you really wanted to.