You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migration engine should know how to migrate Microsoft SQL Server. Some gotchas:
What string type we use by default?
We can choose from the following string types:
varchar would allow us to use UTF-8 encoding, but only on SQL Server 2019. Older versions allow only ASCII characters in this column type.
nvarchar is the original column type, allowing other than just the basic ASCII. Uses UCS-2 encoding, meaning instead of Vec<u8> it holds Vec<u16>, doubling the space usage.
Both variants can either be varchar(n) or nvarchar(n), where n is the maximum length of the string. The maximum n for varchar is 8000 and for nvarchar 4000. When having larger strings, one should use the max variants varchar(max)/nvarchar(max), which changes the storage type out from the row and allows maximum of two gigabytes of data.
What binary size we use by default?
varbinary(n) where n can be maximum of 8000 bytes. Data stays in the row.
varbinary(max) for two gigabytes of storage, data is not kept in the row.
It looks like this has been merged in the prisma-engines repo, but I imagine it would need to be updated to the latest commit in the prisma repo as well before using this?
Just wait for tomorrow's release, or install the latest dev version to try this out. The whole migrate platform is changing now, and we'll announce it tomorrow with the docs and all.
Activity
mattfwood commentedon Dec 7, 2020
It looks like this has been merged in the
prisma-enginesrepo, but I imagine it would need to be updated to the latest commit in theprismarepo as well before using this?pimeys commentedon Dec 7, 2020
Just wait for tomorrow's release, or install the latest dev version to try this out. The whole migrate platform is changing now, and we'll announce it tomorrow with the docs and all.
pimeys commentedon Dec 7, 2020
Closing this due to the JavaScript side working with SQL Server now.