How to force FluentMigrator to run VerionInfo table migrations in Preview Mode #1274
Answered
by
jzabroski
Beatles1692
asked this question in
General
-
I have already posted my question to SO : |
Beta Was this translation helpful? Give feedback.
Answered by
jzabroski
Jun 12, 2020
Replies: 2 comments 4 replies
-
Hi @Beatles1692 , This is currently being tracked in #1226 There are a couple of other relevant issues related to preview mode and versioninfo table:
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jzabroski
-
It's a non-trivial change. I had a hairbrained idea for a hacky solution
that might work faster: mocking DbConnection and DbTransaction so that
calls to CreateCommand to execute a query write to the log.
…On Wed, Apr 21, 2021, 3:37 PM Dan Padmore ***@***.***> wrote:
@jzabroski <https://github.com/jzabroski> I saw the Unit of work ADR
<https://github.com/fluentmigrator/fluentmigrator/blob/master/adr/proposed/UnitOfWork.md>,
which looks to solve or improve many of the things discussed here and
elsewhere related to preview mode.
I'm in a situation on my current project, where I am required to generate
scripts for manual deployment (preview + no-connection), similar to the
user stories outlined in the ADR.
This surfaces some issues like:
1. Generated script for Oracle is not a valid script to execute in its
entirety in Oracle Sql Developer, need to manually execute migration per
migration (or should this work and am I doing it wrong?)
2. Can't use Schema.Exists because this executes instead of generating
script (love the mentioned Preconditions
<#1281> idea as
a solution)
3. VersionInfo.AppliedOn contains script generation date, want date of
script execution (e.g. something like GETDATE() instead of a hardcoded date
in script)
4. Want to wrap generated script with a BEGIN TRANSACTION (currently
targeting SQL Server and Oracle)
(5. Drop/create database to improve local developer experience - ok,
not related to script generation :) )
Is there something I can do to help progress the UnitOfWork proposal?
I suspect this is a non trivial change in the design, but if you already
have specific tasks, maybe it is realistic to delegate some work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1274 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADNH7KCV6FYKE6GUM3GJK3TJ4SOJANCNFSM4N4EMLLQ>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Beatles1692 ,
This is currently being tracked in #1226
There are a couple of other relevant issues related to preview mode and versioninfo table: