-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
im using this
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE TYPE IF NOT EXISTS user_status AS ENUM ('active', 'inactive', 'suspended');
CREATE TYPE IF NOT EXISTS session_status_type AS ENUM ('active','revoked','updated');
CREATE TYPE IF NOT EXISTS company_type AS ENUM ('online_store', 'physical_store', 'multichannel_store');
CREATE TABLE IF NOT EXISTS roles (
id SERIAL PRIMARY KEY,
name VARCHAR(100) UNIQUE NOT NULL,
permission_codes TEXT[] NOT NULL DEFAULT '{}',
is_system_role BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW());
and use docker to run migration in docker-compose :
image: migrate/migrate:latest
restart: "no"
depends_on:
psql_bp:
condition: service_healthy
volumes:
- ../internal/migrations:/migrations
command: [
"-path", "/migrations",
"-database", "postgres://${BLUEPRINT_DB_USERNAME}:${BLUEPRINT_DB_PASSWORD}@psql_bp:${BLUEPRINT_DB_CPORT}/${BLUEPRINT_DB_DATABASE}?sslmode=disable",
"up"
]
networks:
- ganjineh
but got error near "NOT"
error: migration failed: syntax error at or near "NOT" (column 16) in line 8:
Metadata
Metadata
Assignees
Labels
No labels