Skip to content

Commit 8392aed

Browse files
committed
doc: como criar o banco
1 parent dcbd46a commit 8392aed

4 files changed

Lines changed: 43 additions & 9 deletions

File tree

README.es.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,17 @@ Cloudflare Gateway es una herramienta potente y ligera diseñada para almacenar,
3737
```bash
3838
pnpm install
3939
```
40-
3. Inicialice la base de datos local:
40+
3. Cree la base de datos local:
4141
```bash
42-
pnpm wrangler d1 execute cfgateway --local --file=./path/to/schema.sql
42+
npx wrangler d1 create cfgateway --location=enam
43+
```
44+
4. Inicialice el esquema de la base de datos local:
45+
```bash
46+
npx wrangler d1 execute cfgateway --local --file=./schema.sql
47+
```
48+
5. Para usar una base de datos remota (producción):
49+
```bash
50+
npx wrangler d1 execute cfgateway --remote --file=./schema.sql
4351
```
4452

4553
### Desarrollo Local
@@ -65,4 +73,4 @@ Las variables de entorno y los bindings se gestionan en `wrangler.jsonc`:
6573

6674
## 📄 Licencia
6775

68-
Este proyecto está bajo la Licencia MIT - vea el archivo [LICENSE](LICENSE) para más detalles.
76+
Este proyecto está bajo la Licencia FSL-1.1-MIT - vea el archivo [LICENSE](LICENSE) para más detalles.

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,17 @@ Cloudflare Gateway is a powerful and lightweight tool designed to store, visuali
3737
```bash
3838
pnpm install
3939
```
40-
3. Initialize the local database:
40+
3. Create the local database:
4141
```bash
42-
pnpm wrangler d1 execute cfgateway --local --file=./path/to/schema.sql
42+
npx wrangler d1 create cfgateway --location=enam
43+
```
44+
4. Initialize the local database schema:
45+
```bash
46+
npx wrangler d1 execute cfgateway --local --file=./schema.sql
47+
```
48+
5. To use a remote database (production):
49+
```bash
50+
npx wrangler d1 execute cfgateway --remote --file=./schema.sql
4351
```
4452

4553
### Local Development
@@ -65,4 +73,4 @@ Environment variables and bindings are managed in `wrangler.jsonc`:
6573

6674
## 📄 License
6775

68-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
76+
This project is licensed under the FSL-1.1-MIT License - see the [LICENSE](LICENSE) file for details.

README.pt-br.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,17 @@ Cloudflare Gateway é uma ferramenta poderosa e leve projetada para armazenar, v
3737
```bash
3838
pnpm install
3939
```
40-
3. Inicialize o banco de dados local:
40+
3. Crie o banco de dados local:
4141
```bash
42-
pnpm wrangler d1 execute cfgateway --local --file=./path/to/schema.sql
42+
npx wrangler d1 create cfgateway --location=enam
43+
```
44+
4. Inicialize o schema do banco de dados local:
45+
```bash
46+
npx wrangler d1 execute cfgateway --local --file=./schema.sql
47+
```
48+
5. Para usar um banco de dados remoto (produção):
49+
```bash
50+
npx wrangler d1 execute cfgateway --remote --file=./schema.sql
4351
```
4452

4553
### Desenvolvimento Local
@@ -65,4 +73,4 @@ As variáveis de ambiente e bindings são gerenciados no arquivo `wrangler.jsonc
6573

6674
## 📄 Licença
6775

68-
Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE](LICENSE) para mais detalhes.
76+
Este projeto está licenciado sob a Licença FSL-1.1-MIT - veja o arquivo [LICENSE](LICENSE) para mais detalhes.

schema.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CREATE TABLE IF NOT EXISTS messages (
2+
id TEXT PRIMARY KEY,
3+
id_parent TEXT,
4+
url TEXT,
5+
filename TEXT NOT NULL,
6+
content TEXT,
7+
processed_at INTEGER NOT NULL,
8+
status TEXT NOT NULL,
9+
lab INTEGER
10+
);

0 commit comments

Comments
 (0)