-
Notifications
You must be signed in to change notification settings - Fork 297
Closed
Labels
domain/schematech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/migration engineIssue in the Migration EngineIssue in the Migration Enginetopic: sql serverMicrosoft SQL ServerMicrosoft SQL Server
Milestone
Description
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:
varcharwould allow us to use UTF-8 encoding, but only on SQL Server 2019. Older versions allow only ASCII characters in this column type.nvarcharis the original column type, allowing other than just the basic ASCII. Uses UCS-2 encoding, meaning instead ofVec<u8>it holdsVec<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)wherencan be maximum of 8000 bytes. Data stays in the row.varbinary(max)for two gigabytes of storage, data is not kept in the row.
Part of the epic: prisma/prisma#2430
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
domain/schematech/enginesIssue for tech Engines.Issue for tech Engines.tech/engines/migration engineIssue in the Migration EngineIssue in the Migration Enginetopic: sql serverMicrosoft SQL ServerMicrosoft SQL Server