Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
116e9c8d
authored
May 26, 2023
by
HDS
Committed by
GitHub
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改了init.sql重复的bug (#62)
parent
52920726
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
docs/deploy/fastgpt/pg/init.sql
+6
-6
No files found.
docs/deploy/fastgpt/pg/init.sql
View file @
116e9c8d
set
-
e
psql
-
v
ON_ERROR_STOP
=
1
--username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE
EXTENSION
vector
;
CREATE
EXTENSION
IF
NOT
EXISTS
vector
;
-- init table
CREATE
TABLE
modelData
(
CREATE
TABLE
IF
NOT
EXISTS
modelData
(
id
BIGSERIAL
PRIMARY
KEY
,
vector
VECTOR
(
1536
),
status
VARCHAR
(
50
)
NOT
NULL
,
...
...
@@ -14,8 +14,8 @@ CREATE TABLE modelData (
a
TEXT
NOT
NULL
);
-- create index
CREATE
INDEX
modelData_status_index
ON
modelData
USING
HASH
(
status
);
CREATE
INDEX
modelData_userId_index
ON
modelData
USING
HASH
(
user_id
);
CREATE
INDEX
modelData_user
Id_index
ON
modelData
USING
HASH
(
model_id
);
CREATE
INDEX
modelData_kbId_index
ON
modelData
USING
HASH
(
kb_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_status_index
ON
modelData
USING
HASH
(
status
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_userId_index
ON
modelData
USING
HASH
(
user_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_model
Id_index
ON
modelData
USING
HASH
(
model_id
);
CREATE
INDEX
IF
NOT
EXISTS
modelData_kbId_index
ON
modelData
USING
HASH
(
kb_id
);
EOSQL
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment