Closed regisbsb closed 10 years ago
What do you mean by "having an invalid migration"? Are you talking about validation errors or exceptions thrown while executing against a database? In the latter case, you could for example get the pending migrations which would list you Migration_2 and Migration_3 etc. if you had a problem in Migration_2. The migrations are transactional - either they have been executed or rolled back.
Yeah but it would be much easier to say "Migration_2 has failed", then inner exception the Sql error.
Yes, you're right. I shall have a look at this.
Cheers
I've looked at the code and I've noticed that the error is logged. Unfortunately, without saying which Migration it was thrown it. Do you see this message? Would it be enough, to add the information there? I'm a bit hesitant to invent a new kind of exception to wrap DbException (and potentially other exceptions) because that would be breaking change to the API.
Entity framework does that. Maybe a configuration? So it does not break the api, to throw wrapped exceptions, must enable that option.
Regis Benedito dos Santos Bittencourt contact@regis.ws regisbsbittencourt (skype) On 24 Apr 2014 17:23, "dradovic" notifications@github.com wrote:
I've looked at the code and I've noticed that the error is logged. Unfortunately, without saying which Migration it was thrown it. Do you see this message? Would it be enough, to add the information there? I'm a bit hesitant to invent a new kind of exception to wrap DbException (and potentially other exceptions) because that would be breaking change to the API.
— Reply to this email directly or view it on GitHubhttps://github.com/dradovic/MigSharp/issues/49#issuecomment-41300725 .
I'm not a fan of configurable breaking changes. I think that if this information is included in the error log that this is enough.
Fair enough.
I've committed the change to the master. It will be contained in the next release.
Released in 2.3.
For example if you have a invalid migration on Migration_2 but Migration_1 has runned already if hard to tell were is the mistake if you have Migration_3 4 etc...