mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 23:55:55 +08:00
fix: uuid-ossp extension create failed in pgsql (#10)
This commit is contained in:
parent
19eaf27126
commit
2e1cd3db28
@ -18,6 +18,8 @@ depends_on = None
|
|||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";')
|
||||||
|
|
||||||
op.create_table('account_integrates',
|
op.create_table('account_integrates',
|
||||||
sa.Column('id', postgresql.UUID(), server_default=sa.text('uuid_generate_v4()'), nullable=False),
|
sa.Column('id', postgresql.UUID(), server_default=sa.text('uuid_generate_v4()'), nullable=False),
|
||||||
sa.Column('account_id', postgresql.UUID(), nullable=False),
|
sa.Column('account_id', postgresql.UUID(), nullable=False),
|
||||||
@ -790,4 +792,6 @@ def downgrade():
|
|||||||
|
|
||||||
op.drop_table('accounts')
|
op.drop_table('accounts')
|
||||||
op.drop_table('account_integrates')
|
op.drop_table('account_integrates')
|
||||||
|
|
||||||
|
op.execute('DROP EXTENSION IF EXISTS "uuid-ossp";')
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
@ -13,7 +13,6 @@ services:
|
|||||||
PGDATA: /var/lib/postgresql/data/pgdata
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/db/data:/var/lib/postgresql/data
|
- ./volumes/db/data:/var/lib/postgresql/data
|
||||||
- ./volumes/db/scripts:/docker-entrypoint-initdb.d/
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
|
@ -163,7 +163,6 @@ services:
|
|||||||
PGDATA: /var/lib/postgresql/data/pgdata
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/db/data:/var/lib/postgresql/data
|
- ./volumes/db/data:/var/lib/postgresql/data
|
||||||
- ./volumes/db/scripts:/docker-entrypoint-initdb.d/
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
psql -U postgres -d dify -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'
|
|
Loading…
x
Reference in New Issue
Block a user