在 Heroku Cedar 堆栈上使用 Sqlite3

2023-10-09数据库问题
5

本文介绍了在 Heroku Cedar 堆栈上使用 Sqlite3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

有没有办法在 Heroku 上使用 Sqlite3 和 Django?

Is there a way to use Sqlite3 with Django on Heroku?

推荐答案

雪松栈的文件系统不是只读的.

The cedar stack's filesystem is not readonly.

但是,您仍然不能在其上存储任何数据,因为文件系统是短暂的.

However, you still mustn't store any data on it because the filesystem is ephemeral.

每当您的应用程序重新启动时,您写入应用程序文件系统的任何内容都会永远消失.

Any time your application restarts, whatever you had written to your application's filesystem disappears forever.

任何时候添加一个测功机,这两个测功机都有自己的临时系统;一个测功机存储到其临时文件系统的任何数据都不能用于另一个测功机或您以后可能添加的任何其他测功机.

Any time you add a dyno, the two dynos each have their own ephemeral system; any data stored by one dyno to its ephemeral filesystem is not available to the other dyno or to any additional dynos you may add later.

Sqlite3 将数据写入本地文件系统.你不能在 Heroku 中使用 Sqlite3.

Sqlite3 writes data to the local filesystem. You cannot use Sqlite3 with Heroku.

Heroku 提供了一个默认的 PostgreSQL 安装,由 Heroku 管理.你可以使用它.

Heroku provides a default PostgreSQL installation, which Heroku manages. You can use that.

您还可以使用任何第三方管理的云数据库系统,例如 Amazon RDS 或 Xeround 的 MySQL、MongoHQ 或 MongoLab 的 MongoDB,或者 Cloudant 的 CouchDB - 所有这些都可以作为 Heroku 插件使用.

You can also use any third-party-managed cloud database system, such as Amazon RDS' or Xeround's MySQL, MongoHQ's or MongoLab's MongoDB, or Cloudant's CouchDB - all of which are available as Heroku addons.

这篇关于在 Heroku Cedar 堆栈上使用 Sqlite3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

如何在MySQL中为每个组选择第一行?
How to select the first row for each group in MySQL?(如何在MySQL中为每个组选择第一行?)...
2024-04-16 数据库问题
13

MySQL - 获取最低值
MySQL - Fetching lowest value(MySQL - 获取最低值)...
2024-04-16 数据库问题
8

在 cmakelist.txt 中添加和链接 mysql 库
Add and link mysql libraries in a cmakelist.txt(在 cmakelist.txt 中添加和链接 mysql 库)...
2024-04-16 数据库问题
41

考勤数据库的良好数据库设计(架构)是什么?
What is a good database design (schema) for a attendance database?(考勤数据库的良好数据库设计(架构)是什么?)...
2024-04-16 数据库问题
7

子类型的表关系
Table relationship for subtypes(子类型的表关系)...
2024-04-16 数据库问题
10