Skip to content

Commit

Permalink
feat: add spatial index wfs v2
Browse files Browse the repository at this point in the history
  • Loading branch information
emalfroy authored and ArneD committed Aug 25, 2023
1 parent 677b8a7 commit 4de5f0c
Show file tree
Hide file tree
Showing 2 changed files with 217 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AddressRegistry.Projections.Wfs.Migrations
{
using Infrastructure;

public partial class AddSpatialIndexV2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
@"CREATE SPATIAL INDEX [SPATIAL_Address_Position] ON [wfs.address].[AddressWfs] ([Position])
USING GEOMETRY_GRID
WITH (
BOUNDING_BOX =(22279.17, 153050.23, 258873.3, 244022.31),
GRIDS =(
LEVEL_1 = MEDIUM,
LEVEL_2 = MEDIUM,
LEVEL_3 = MEDIUM,
LEVEL_4 = MEDIUM),
CELLS_PER_OBJECT = 5)
GO");
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
schema:Schema.Wfs,
table: "AddressWfs",
name: "[SPATIAL_Address_Position]");
}
}
}

0 comments on commit 4de5f0c

Please sign in to comment.