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
COLUMNSTORE and SPATIAL indexes are not properly defined neither when using atlas schema inspect, nor with atlas migrate diff
I create the following index:
CREATE SPATIAL INDEX [SpatialIndex-20240607-140858] ON [dbo].[Users]
(
[Coordinates]
)USING GEOGRAPHY_GRID
WITH (GRIDS =(LEVEL_1 = MEDIUM,LEVEL_2 = MEDIUM,LEVEL_3 = MEDIUM,LEVEL_4 = MEDIUM),
CELLS_PER_OBJECT = 16, PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
After atlas schema inspect it's definition inside test.hcl is as follows:
index "SpatialIndex-20240607-140858" {
type = SPATIAL
}
Migration generated by atlas migrate diff from the database creates the following code inside the migration:
-- Create index "SpatialIndex-20240607-140858" to table: "Users"
CREATE SPATIAL INDEX [SpatialIndex-20240607-140858] ON [dbo].[Users] ();
Obviously, when trying to apply such a migration, it fails:
The same happens with COLUMNSTORE index:
SQL to create the index inside the database:
CREATE NONCLUSTERED COLUMNSTORE INDEX [NonClusteredColumnStoreIndex-20240607-140323] ON [dbo].[Users]
(
[Name],
[Email]
)WITH (DROP_EXISTING = OFF, COMPRESSION_DELAY = 0, DATA_COMPRESSION = COLUMNSTORE) ON [PRIMARY]
GO
Index definition inside test.hcl after atlas schema inspect:
index "NonClusteredColumnStoreIndex-20240607-140323" {
nonclustered = true
type = COLUMNSTORE
}
Migration created with atlas migrate diff from the db:
-- Create index "NonClusteredColumnStoreIndex-20240607-140323" to table: "Users"
CREATE NONCLUSTERED COLUMNSTORE INDEX [NonClusteredColumnStoreIndex-20240607-134450] ON [dbo].[Users] ();
Additional info:
atlas version v0.23.1-ccbf575-canary
SQL Server 16.0.1115.1
docker image/url used for "dev-url" param "docker://sqlserver/2022-latest/dev?mode=database"
The text was updated successfully, but these errors were encountered:
paul-komarnytskyy
changed the title
Invalid definitions for COLUMNSTORE and SPATIAL Indexes
Invalid definitions for COLUMNSTORE and SPATIAL Indexes for SQL Server
Jun 7, 2024
COLUMNSTORE and SPATIAL indexes are not properly defined neither when using
atlas schema inspect
, nor withatlas migrate diff
I create the following index:
After
atlas schema
inspect it's definition insidetest.hcl
is as follows:Migration generated by
atlas migrate diff
from the database creates the following code inside the migration:Obviously, when trying to apply such a migration, it fails:
The same happens with COLUMNSTORE index:
SQL to create the index inside the database:
Index definition inside
test.hcl
afteratlas schema inspect
:Migration created with
atlas migrate diff
from the db:Additional info:
atlas version v0.23.1-ccbf575-canary
SQL Server 16.0.1115.1
docker image/url used for "dev-url" param "docker://sqlserver/2022-latest/dev?mode=database"
The text was updated successfully, but these errors were encountered: