Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create geospatial table: getting error "ERROR: type "geometry" does not exist" #4

Closed
chandhsb opened this issue Oct 6, 2014 · 2 comments
Milestone

Comments

@chandhsb
Copy link

chandhsb commented Oct 6, 2014

Hi,
I am new to geospatial datatypes, i am using postgresSql database and PostGIS. I added all the required jars like liquibase-core 3.2, liquibase-spatial 1.0.0, postgresql 9.2, postgis-jdbc 2.1.3.
This is my liquibase script,
when i run mvn liquibase:update from cygwin, i am getting the error,

liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE geo.CIRCLE (GEOFENCEID INT NOT NULL, RADIUS INT NOT NULL, CENTERPOINT GEOMETRY(point, 4326) NOT NULL, CONSTRAINT PK_CIRCLE PRIMARY KEY (GEOFENCEID)): ERROR: type "geometry" does not exist

Please help me on this issue

         <preConditions>
        <spatial:spatialSupported/>
    </preConditions>

    <createTable tableName="CIRCLE">
        <column name="GEOFENCEID" type="int">
            <constraints nullable="false" primaryKey="true" primaryKeyName="PK_CIRCLE" />
        </column>
        <column name="RADIUS" type="int">
            <constraints nullable="false" />
        </column>
        <column name="CENTERPOINT" type="GEOMETRY(point,4326)">
            <constraints nullable="false" />
        </column>
    </createTable>
@jmvivo
Copy link

jmvivo commented Oct 7, 2014

Did you execute create extension postgis; on datatabase?

@chandhsb
Copy link
Author

chandhsb commented Oct 7, 2014

I solved the error, actually i am using the postgres as the database name. I saw in the postGIS website we should not use postgres as the database, i changed the db name now it is working fine.
Thanks.

@chandhsb chandhsb closed this as completed Oct 7, 2014
@lonnyj lonnyj modified the milestone: 1.1.0 Nov 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants