Liquibase Spatial

Liquibase Spatial extends Liquibase to handle spatial indexing and geometry types

Лицензия

Лицензия

Категории

Категории

Liquibase Данные Базы данных
Группа

Группа

com.github.lonnyj
Идентификатор

Идентификатор

liquibase-spatial
Последняя версия

Последняя версия

1.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Liquibase Spatial
Liquibase Spatial extends Liquibase to handle spatial indexing and geometry types
Система контроля версий

Система контроля версий

https://github.com/lonnyj/liquibase-spatial

Скачать liquibase-spatial

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.lonnyj/liquibase-spatial/ -->
<dependency>
    <groupId>com.github.lonnyj</groupId>
    <artifactId>liquibase-spatial</artifactId>
    <version>1.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.lonnyj/liquibase-spatial/
implementation 'com.github.lonnyj:liquibase-spatial:1.2.1'
// https://jarcasting.com/artifacts/com.github.lonnyj/liquibase-spatial/
implementation ("com.github.lonnyj:liquibase-spatial:1.2.1")
'com.github.lonnyj:liquibase-spatial:jar:1.2.1'
<dependency org="com.github.lonnyj" name="liquibase-spatial" rev="1.2.1">
  <artifact name="liquibase-spatial" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.lonnyj', module='liquibase-spatial', version='1.2.1')
)
libraryDependencies += "com.github.lonnyj" % "liquibase-spatial" % "1.2.1"
[com.github.lonnyj/liquibase-spatial "1.2.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.vividsolutions : jts jar 1.13
org.liquibase : liquibase-core jar 3.3.0

test (5)

Идентификатор библиотеки Тип Версия
com.h2database : h2 jar 1.4.177
net.sourceforge.hatbox » hatbox jar 1.0.b9
org.mockito : mockito-core jar 1.10.19
org.opengeo » geodb jar 0.8
org.testng : testng jar 6.8.17

Модули Проекта

Данный проект не имеет модулей.

Liquibase Spatial

Liquibase Spatial is an extension to Liquibase to handle spatial indexing and geometry types. It requires Liquibase 3.1.1 or newer.

Liquibase Version Liquibase Spatial Version
Liquibase 3.1.1 Liquibase Spatial 1.0.x
Liquibase 3.2.x Liquibase Spatial 1.1.x
Liquibase 3.3.x Liquibase Spatial 1.2.x

In order to use this extension, you must have the liquibase-spatial jar in your classpath. For XML change logs, define the spatial namespace as below:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
   xmlns:spatial="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-spatial"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd 
   http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-spatial 
      http://lonnyj.github.com/liquibase-spatial/liquibase-spatial.xsd">
</databaseChangeLog>

Using the XML elements defined by this extension requires specifying the spatial namespace prefix on those elements. Here is a quick example of how to create a table with a geometry column, create a spatial index on that column, and insert data into the table:

<changeSet id="Create table" author="bob">
   <preConditions>
      <spatial:spatialSupported />
   </preConditions>
   <createTable tableName="EXAMPLE">
      <column name="ID" type="BIGINT">
         <constraints nullable="false" primaryKey="true" primaryKeyName="EXAMPLE_PK" />
      </column>
      <column name="GEOM" type="GEOMETRY(Point, 4326)">
         <constraints nullable="false" />
      </column>
   </createTable>
</changeSet>

<changeSet id="Create spatial index" author="bob">
   <preConditions>
      <not>
         <spatial:spatialIndexExists tableName="EXAMPLE" columnNames="GEOM" />
      </not>
   </preConditions>
   <spatial:createSpatialIndex tableName="EXAMPLE" indexName="EXAMPLE_GEOM_IDX" geometryType="Point" srid="4326">
      <column name="GEOM" />
   </spatial:createSpatialIndex>
</changeSet>

<changeSet id="Insert spatial data" author="bob">
   <insert tableName="EXAMPLE">
      <column name="ID" valueNumeric="1" />
      <column name="GEOM" value="SRID=4326;POINT(-5 -5)" />
   </insert>
   <insert tableName="EXAMPLE">
      <column name="ID" valueNumeric="2" />
      <column name="GEOM" value="SRID=4326;POINT(0 0)" />
   </insert>
   <insert tableName="EXAMPLE">
      <column name="ID" valueNumeric="3" />
      <column name="GEOM" value="SRID=4326;POINT(5 5)" />
   </insert>
</changeSet>

Refer to the documentation for further information.

Версии библиотеки

Версия
1.2.1
1.2.0
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0