-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[Multi-Database Support][postgre] add postgre sql and docs #4782
Changes from all commits
68baba1
19a1bc1
58fa9cc
46aa0c2
18d4eb6
69ff653
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
-- | ||
-- Copyright 2023 Apollo Authors | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
/* # CREATE apolloconfigdb; */ | ||
/* # ------------------------------------------------------------ */ | ||
|
||
CREATE DATABASE "ApolloConfigDB"; | ||
|
||
\c "ApolloConfigDB" | ||
|
||
CREATE SCHEMA apolloconfig; | ||
|
||
GRANT ALL PRIVILEGES ON DATABASE "ApolloConfigDB" to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA apolloconfig to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA apolloconfig to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON SCHEMA apolloconfig TO postgres; | ||
|
||
|
||
/* # CREATE apolloconfigdb; */ | ||
/* # ------------------------------------------------------------ */ | ||
|
||
CREATE DATABASE "ApolloPortalDB"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like Postgres is very different from MySQL, which would make future contributions harder. cc @apolloconfig/committers what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I humbly suggest that we create a separate folder for now, as we are not entirely clear on which boundaries should be placed between multiple databases in the main code and extensions. My recommendation is that we start by placing PostgreSQL and other databases in a separate folder. Once we have successfully achieved compatibility with one or two databases, we can then begin to separate the repository. |
||
|
||
\c "ApolloPortalDB" | ||
|
||
CREATE SCHEMA apolloportal; | ||
|
||
GRANT ALL PRIVILEGES ON DATABASE "ApolloPortalDB" to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA apolloportal to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA apolloportal to postgres; | ||
|
||
GRANT ALL PRIVILEGES ON SCHEMA apolloportal TO postgres; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the default database for quick start?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nobodyiam I think it will be mysql, since we haven't finish h2 feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If mysql is the default, then section 5.2 is not necessary?