firebase - firebase 数据库:从 CLI 更新 - 一个项目中的多个数据库
问题描述
我的 firebase 项目有多个实时数据库 (RTDB)。当我有多个数据库时,如何使用命令行界面 (CLI) 更新特定数据库?
$ firebase database:update --help
Usage: database:update [options] <path> [infile]
update some of the keys for the defined path in your Firebase
Options:
-d, --data <data> specify escaped JSON directly
-y, --confirm pass this option to bypass confirmation prompt
-h, --help output usage information
我选择了我的项目,firebase use -add
但帮助页面中没有任何关于定义数据库 URL 的内容,类似于这个问题。node.js firebase-import和 python firebase-streaming-import都包含数据库 URL 作为参数。
解决方案
事实证明,今天在3.19.0 版本中发布了对此的支持。 firebase database:get --help
现在报告:
--instance <instance> use the database <instance>.firebaseio.com (if omitted, use default database instance)
因此,您应该能够使用它来指定数据库的速记实例名称。
推荐阅读
- css - Angular 8 - Kendo TextArea 组件内的 formControlName
- excel - 在宏的受保护的 excel 文件中授予添加或删除行权限
- c++ - c ++字符到数字大写和小写字符
- python - 如何自动将弃用的 pymongo 命令转换为新命令
- java - Selenium-jenkins 与 Linux。“指定的firefox二进制位置不存在或不是真实文件
- php - 通过 docker compose 将 laravel 容器连接到现有的 mysql 容器
- cypress - 转到下一页,直到找到元素
- ios - 如何在 IOS13 中找到这个与字体相关的 coretext 警告的来源?
- vue.js - 如何在 Vue 中使按钮的占位符动态化?
- javascript - 如何在 react.js 中创建我们自己的按钮组件,如 antdesign