As far as I understand, Liquibase execute the changesets according to the order they are written in the change log.
I want the changeset to be ran in another order.
Is there any way to change the execution order of changesets?
A prompt response for my question would be highly appreciated.
The order of your changelog in Liquibase is the order that changes should be deployed (executed) if needed.
Liquibase relies on you to setup the correct order.
In order to use a dynamic order that matches the current situation you should use a compare & sync tools that will generate the relevant DDL based on your source control repository and your target environment.
Dbmaestro (for which I work) offers this feature
We had a smiliar approach. We had one xml file per table to have a good overview over every table and its columns. But when we needed to refactor(e.g. add new columns, move some data, add new FKs) our db, it was revealed, that this approach comes with some problems. The possibility to see what belongs to one table and the execution order are in conflict with each other. My best(but still dirty) solution was to start a single new xml file named migration_X.xml with all changeSets to add columns, copy some data, add new constraints or FKs.
If I want to see the definition of one table, I generate the DDL.
Related
In maximo, can we delete a work order? The select action menu gives me
BMXAA4612E - Cannot delete because it is, or had at one time been approved.
I have created numerous test work orders and it is getting difficult to track new work orders.
Short Answer: You can't.
Standard Maximo will not let you delete it past a certain point. It keeps this data around for a sort of auditing (and because there could be a lot of dependencies to undo).
Bad Answer: With some database queries. You can of course delete about anything if you start modifying Maximo's underlying database directly. The Work Order object has a number of related tables though, so make sure you delete all referenced data from those as well. And there might be other places you need to update too, like a PM due date, depending on the situation.
In a normal Maximo environment, it is very common to have a lot of open work orders at any given time. You are going to need to develop ways to handle the fluff. Closing your old test work orders helps, because Maximo filters out closed work orders by default. Standard filters with some specialized data and saved queries are some other options.
Clear attribute: FIRSTAPPRSTATUS
update woactivity set FIRSTAPPRSTATUS = null
where ;
Then deleting should be possible
--> However it is not (in maximo 7.6)
For Maximo 7.6, change the workorder status to WAPPR from the backend or through MIF and then use MIF to delete the record(s)
I created an action that executes set FIRSAPPRSTATUS null and created an escalation with the condition of selecting a work order. After the escalation is completed, deletion will be available if the remaining conditions for deleting the work order are met.
I used some of the Hybris reserved Deployment code and then later changed to non-reserved deployment type codes. Do I need to Initialize the system in-order to reflect the changes with new deployment code or just an Update works. There are many items that deployment code has been changed. Why update doesn't work?
When you use a reserved code in your deployment table, you're likely to add the attributes of your object in an existing table. If you have attributes with the same name, it'll surely be a mess in the table (I don't know how hybris will choose the table type for example).
When you run an update with the good deployment code, it will create a new table which is just fine. The other table which has been used by two objects will still remain potentially broken because hybris won't delete any column.
That's why you should initialize your system to have a clean DB. The issue is that you'll lose all your data.
If you need to migrate data it will be probably quite hard because you must have to look on the broken table and distinguish between the attributes that should not be there and the others. So I hope for you that it's just a dev issue!
Actually i would suggest you to do initialize rather than update more likely that the update will not work for you in this case and probably you will get some error messages saying invalid pk xxxxxxxxxxxx because of unknown typecode yyyy.
As you may know the typeCode (deployment code) is an essential operator for the generation process of PKs in Hybris and thanks to it Hybris can ensure the uniquenessity of the PKs, so even if you change the old typeCode with a new one it's very likely that Hybris will still keep the old typeCode somewhere hence PKs already generated will never be consistent with the new typeCode.
So that's why you should never change the typecode of an item once given.
My suggestion is :
To make a backup of your existing data (you can export it from HMC,
you may take a look at alain.janinm's answer here).
Then initialize your System.
Then re-import the data again.
Note : that typecodes between 0 and 10000 are already reserved for hybris
particular items.
I have to import data from a foreign system into a CRM instance. The foreign system has an ID for either a contact or account (which is also present in CRM, the common identifier).
I'm wondering if it would be possible to extract that data simply through SQL Management Studio, paste this in an Excel file, upload that file through Data Management and have CRM recognize a certain column (the common identifier) as the key, and update all the other fields that would present in that Excel file I plan to upload.
For example, in said foreign system I have:
ClientID ValueNotPresentInCrm
344555 Bleh
And currently, in CRM, I have
accountid xmr_clientid xmr_ValueNotPresentInCrm
24436EDB-9CFA-E511-80C0-00155D7B5806 344555
Obviously, I want to update the xmr_ValueNotPresentInCrm column.
Is this even possible ?
There are two distinct flavours of Excel upload in CRM.
Create new records.
Update existing records.
You will need to use option 2, this involves downloading an Excel file (actually XML) which contains the existing records, making changes in Excel, uploading the file again.
Its a little long winded but is the simplest solution. PowerObjects has a nice tutorial here.
I would also take a look at the Configuration Migration tool from the SDK. It allows you to specify a uniqueness condition on import (see step 12), which would be particularly useful to your scenario.
There is also an open source, custom tool called the Dynamics CRM Configuration Data Mover which you also may find useful. It's less relevant to your scenario because it doesn't seem to have an equivalent uniqueness condition feature, but it's still worth noting.
I need to filter a a table with parameters that are calculated on a non related table, but to do this in Access web I need to add the [Project_Id] to the task list.
To clarify further, the user answers some questions regarding the details of a project, which in turn will calculate in the background a group of parameters that are needed to sort a task list.
The problem is the task list is generic and not related to a project so before I can use the project related filter parameters I need to assign a project id to the task list or there is no relationship and no way of knowing what project parameters to use.
I tried to do this with a query but being a Web database I am unable to select the data from the form control.
Hopefully someone can help me find a solution, because I have exhausted Google and my own knowledge on the subject. One last thing I am unable to use code thanks to security issues.
In case anyone is interested I found away to assign the project id to the task list using data macros.
The data macro is assigned to a table that is related to the project and when updated edits the tasks list to add the current project id for each record in the table.
I still have some issues to work around, but in general it does what I need.
I'm trying to figure out how ExpressionEngine deletes entries.
I've written an log-like extension that tracks when an entry is created. When I delete an entry through EE's edit section, the entry is also removed from the separate table I created for my extension.
How does EE know to delete the row from my table when the entry is removed? One of the columns in my table is `entry_id`. It would seem like EE automatically checks all tables for a entry_id column and if the value matches the value being deleted, the row is removed. Can anyone confirm this?
It would explain why I didn't have to make a function that hooks into delete_entries_loop to achieve this functionality.
That's very odd. That behavior would be insane if it was indeed the case!
Looking at the delete_entry() method of the Channel Entries API, the deletions are very specifically limited to:
channel_titles
channel_data
category_posts
relationships
comments
comment_subscriptions
channel_entries_autosave
entry_versioning
The Channel Fields API is also called, to let fieldtypes delete what they need to from their own database tables based on the entry being deleted, but only if they contain a delete() method.
I'd suggest turning on the output profiler, then running the deletion routine to see what queries are being run.