System Information
- 4.0.0:
- Ubuntu:
- sqlite:
- 14:
- ****:
- ****:
change the ./config/database.js file
module.exports = ({ env }) => ({
connection: {
client: 'postgres',
connection: {
host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'database_name'),
user: env('DATABASE_USERNAME', 'user'),
password: env('DATABASE_PASSWORD', 'password'),
ssl: env.bool('DATABASE_SSL', false),
},
},
});
Then restart the server.
You may need to install pg or create the database manually.
I tried to change the ./config/database.js file.
But after restart strapi, I lost all my previous content-type.
What I need to do to save my work when I change a database?