Comments (10)
Hi @adiefrat Thx for the feedback
If you want me to help you, you'll have to give a lot more details about your issue.
Because this test in Evolve checks that what you describe cannot happenned:
So what version of Evolve do you use, what RDBMS and its version, how do you execute your migrations, what names because this one (V1_2_InsertIntoTestTable) has no extension and no separator (__) etc ...
The more the easier for me :)
from evolve.
Hey,
I'm using Evolve 1.8.0 with MSSQL(SQLServer) and .NET Framework 4.7.1. I set the migrations names with
<add key="Evolve.SqlMigrationSeparator" value="_" />
so the files names looks like this: V01_CreateTestTable, V02_InsertIntoTestTable.
This is the code I added to my Web.config:
<add key="Evolve.ConnectionString" value="Server=.;Database=;Integrated Security=True;" /> <add key="Evolve.Driver" value="SqlClient" /> <add key="Evolve.Locations" value="C:\Project\CurrentProject\Sql_Scripts\" /> <add key="Evolve.Command" value="migrate" /> <add key="Evolve.SqlMigrationSeparator" value="_" /> <add key="Evolve.EnableClusterMode" value="false" />
from evolve.
Try using the default separator please __. Or anything but _
from evolve.
Tried that. Still the same.
This is the data in my changelog table
from evolve.
I see that the V02 script is executed multiple timples. But why not the V1 also ? strange.
Can you please change the
add key="Evolve.Command" value="migrate" to
add key="Evolve.Command" value="erase", execute and migrate again
And then test it again, because I see the sequence does not start to 1 (12 on your screenshot)
from evolve.
I didn't run V01 on the second because its creating a table which is already exist from the first run (12 on my screenshot). When i'm running all the scrips again I'm getting the next error:
'EvolveException: Error executing script: V01__CreateTestTable.sql. There is already an object named 'EvolveTest' in the database...'
I'm getting the same error when running it again after executing erase.
from evolve.
I'm getting the same error when running it again after executing erase.
Please create a new database for these tests.
Run Evolve and check the traces in the output window of Visual Studio, check the content of the changelog table and see if your table and data have been created/inserted
There is absolutly non reason for this first test to fail.
Then reexcute Evolve wihtout changing anything and tell me what has happened. Send me the output content again
from evolve.
So I created new database and it works.
One of the problems was that I didn't write the DB name in the Evolve connectionstring- solved.
The other problem is that if I have a table that belongs to "dbo" schema and was not created by Evolve, erase will not work with the next error:
" Cannot erase schema dbo. This schema was not empty when Evolve first started migrations."
But I want to run the migration on existing db and not on empty one.
from evolve.
Ok that is a good start :)
Using Evolve to automate sql migrations on an existing database is ok.
The only thing is Evolve cannot erase schemas it has not previously created. And it is perfectly fine. It is the desire behaviour because if the schema was not empty when Evolve first started, it will not be able to rebuild it if it erases it.
So have you still got a problem ?
from evolve.
No.
Can you help me with issue #59 ?
from evolve.
Related Issues (20)
- [Logging] Documentation missing
- Can command line interface accept password from environment HOT 1
- Bug: Error when trying to migrate large files
- Error: `syntax error at or near "-" at character 30` when running Evolve.Erase()
- [question] how to capture all SQL so that it can be applied by some other tool? HOT 1
- Feature Request: Code-based Migrations
- Allow versions longer than long.MaxValue
- Unable to load shared library 'SQLite.Interop.dll' HOT 5
- Unable to apply migration from two different sql files HOT 1
- Inconsistent behavior in treating paths in Evolve.Evolve() on Windows and Linux HOT 1
- Tool does not work the .NET 7 HOT 2
- Use Microsoft.Data.SqlClient HOT 1
- evolve and Postgres get error "SHOW VARIABLES LIKE '" HOT 4
- [Evolve Exception] CREATE INDEX CONCURRENTLY cannot be executed within a pipeline Sql query: -- evolve-tx-off
- Cannot proceed, because event scheduler is disabled. HOT 1
- Version sorting HOT 1
- Is the timeout capped at 60 seconds somewhere? HOT 5
- Migrate from System.Data.SqlClient to Microsoft.Data.SqlClient
- Netlify docs appear to be down: https://evolve-db.netlify.com shows "Site Not Found" HOT 3
- parallel migration with schema level lock ids
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evolve.