GithubHelp home page GithubHelp logo

Comments (6)

erikbra avatar erikbra commented on August 23, 2024 1

Solved in #501 - much easier to do stuff like this after #482 :)

from grate.

erikbra avatar erikbra commented on August 23, 2024

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.

RachelAmbler avatar RachelAmbler commented on August 23, 2024

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.

OzBob avatar OzBob commented on August 23, 2024

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.

wokket avatar wokket commented on August 23, 2024

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.

RachelAmbler avatar RachelAmbler commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.