Comments (6)
Solved in #501 - much easier to do stuff like this after #482 :)
from grate.
Hi, @OzBob, thanks for your input! I think @RachelAmbler already has this covered with #246 . And, wouldn't the drop/alter solution here kill all existing data? I'd prefer keeping existing data, and changing the datatype of the column instead.
A quick question about having problems building, where did you get stuck? Could we improve the documentation on building grate yourself locally, maybe?
from grate.
Hi, @OzBob, thanks for your input! I think @RachelAmbler already has this covered with #246 . And, wouldn't the drop/alter solution here kill all existing data? I'd prefer keeping existing data, and changing the datatype of the column instead.
A quick question about having problems building, where did you get stuck? Could we improve the documentation on building grate yourself locally, maybe?
You are correct - that was indeed one of the changes I put in.
from grate.
Fair point on the loss-of-data, here's a loss-less method:
ALTER TABLE [grate].[ScriptsRun] ADD [text_of_script2] nvarchar(max);
UPDATE [grate].[ScriptsRun] SET [text_of_script2]=convert(nvarchar(max),[text_of_script])
ALTER TABLE [grate].[ScriptsRun] DROP COLUMN [text_of_script]
ALTER TABLE [grate].[ScriptsRun] ADD [text_of_script] nvarchar(max)
UPDATE [grate].[ScriptsRun] SET [text_of_script]=[text_of_script2]
ALTER TABLE [grate].[ScriptsRun] DROP COLUMN [text_of_script2]
SSMS doesn't like executing that all at once, but run one line at a time works fine.
How do you manage migrations?
from grate.
I understand the desire to move to a non-deprecated datatype, and would support us moving to nvarchar
for freshly created grate tables (as originally raised by @RachelAmbler).
I will point out that sql statements that aren't semicolon terminated have also been deprecated for at least 14 years, and I don't see everyone freaking out about that in day to day life 🤣
Maybe we don't need to worry about migrating existing tables yet until we get a clear statement from MS that the datatype will cease to function in version x?
from grate.
Fair point on the loss-of-data, here's a loss-less method:
ALTER TABLE [grate].[ScriptsRun] ADD [text_of_script2] nvarchar(max); UPDATE [grate].[ScriptsRun] SET [text_of_script2]=convert(nvarchar(max),[text_of_script]) ALTER TABLE [grate].[ScriptsRun] DROP COLUMN [text_of_script] ALTER TABLE [grate].[ScriptsRun] ADD [text_of_script] nvarchar(max) UPDATE [grate].[ScriptsRun] SET [text_of_script]=[text_of_script2] ALTER TABLE [grate].[ScriptsRun] DROP COLUMN [text_of_script2]
SSMS doesn't like executing that all at once, but run one line at a time works fine.
How do you manage migrations?
The issue as I see it here is adding extra functionality to grate
just for SQL Server. grate
is by its very design a homogeneous application. I'd be worried by adding such functionality in that it 'skews' the app into treating some RDBMS's as 'higher class' citizens than others.
Whilst I agree that this can be seen to be a slightly annoying issue to deal with, what I personally feel we should do is deal with situations like these outside of grate
- perhaps by documentation and associated scripts. Especially as these issues are 'one and done' for each repo.
from grate.
Related Issues (20)
- Error with Grate 1.7.0 - Read-only file system HOT 3
- Grate internal scripts fail when using CreateDatabase scripts HOT 4
- Upgrade failing for MySQL with syntax error using v1.7.0 HOT 8
- Suppressing logging of internal grate migrations doesn't appear to be working correctly HOT 3
- Scripts in internal Grate migration tables are always registered as "run" HOT 3
- --drop without continuing migration use case HOT 1
- Create database fails when an empty createDatabase folder is present
- Should CONTRIBUTING.md be updated to list .NET 8 HOT 2
- runAfterCreateDatabase are run even if database isn't created from scratch by grate HOT 3
- GrateScritpsRun everytime i run the tool HOT 2
- Question - How to mark one-time migration as run HOT 3
- Doesn't work on console app NET 8 using grate.sqlserver HOT 1
- Running Grate on RoundhousE database - all scripts are new HOT 8
- Baseline creates orphan version_id in ScriptsRun HOT 1
- This is still not fixed. Running grate on a postgres database which had previously been migrated using roundhouse does not work. HOT 2
- Publish linux/arm64 images HOT 2
- v1.8.0 MariaDB/MySQL fix casing scripts seem to break with MySQL
- Migration fails to complete with transaction error HOT 1
- [FEATURE] : Auto Create ALTER TABLE scripts when an existing table adds column to existing SQL Script. HOT 1
- Issue while creating ONLINE indexes for localhost. HOT 1
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 grate.