Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions docs/migrations/alloydb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,40 +69,6 @@ chmod +x alloydb-auth-proxy
postgresql://your_username:your_password@your-alloydb-ip:5432/your_database?sslmode=require
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/aws-aurora.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,40 +56,6 @@ postgresql://your_username:your_password@your-aurora-endpoint:5432/your_database

You can find the endpoint in the AWS Aurora Console under your cluster details.

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/aws-rds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,6 @@ postgresql://your_username:your_password@your-rds-endpoint:5432/your_database

You can find the endpoint in the AWS RDS Console under your instance details.

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,6 @@ Azure connection strings typically look like this:
postgresql://your_username:your_password@your-server.postgres.database.azure.com:5432/postgres?sslmode=require
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/digitalocean.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,6 @@ DigitalOcean connection strings typically look like this:
postgresql://your_username:your_password@your-db-host:5432/defaultdb?sslmode=require
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/gcp-cloudsql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,40 +67,6 @@ chmod +x cloud-sql-proxy
postgresql://your_username:your_password@your-cloudsql-ip:5432/your_database?sslmode=require
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/heroku.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,6 @@ If you're on a Premium plan with private access:
2. **Configure VPC peering** if needed
3. **Run migration from within Heroku** environment

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/neon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,6 @@ Neon connection strings typically look like this:
postgresql://your_username:your_password@ep-cool-name-123456.us-east-2.aws.neon.tech/your_db?sslmode=require
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
34 changes: 0 additions & 34 deletions docs/migrations/self-hosted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,40 +84,6 @@ If SSL is disabled:
postgresql://your_username:your_password@your-server-ip:5432/your_database?sslmode=disable
```

## Replicate Database Roles

Before migrating your data, you'll need to replicate the database roles from your source database to your Xata branch.

### Extract Roles from Source Database

Connect to your source database and extract the role definitions:

```sql
-- Extract role definitions (run this on your source database)
SELECT
'CREATE ROLE ' || rolname || ' WITH ' ||
CASE WHEN rolcanlogin THEN 'LOGIN ' ELSE 'NOLOGIN ' END ||
CASE WHEN rolsuper THEN 'SUPERUSER ' ELSE 'NOSUPERUSER ' END ||
CASE WHEN rolinherit THEN 'INHERIT ' ELSE 'NOINHERIT ' END ||
CASE WHEN rolcreaterole THEN 'CREATEROLE ' ELSE 'NOCREATEROLE ' END ||
CASE WHEN rolcreatedb THEN 'CREATEDB ' ELSE 'NOCREATEDB ' END ||
CASE WHEN rolreplication THEN 'REPLICATION ' ELSE 'NOREPLICATION ' END ||
CASE WHEN rolbypassrls THEN 'BYPASSRLS ' ELSE 'NOBYPASSRLS ' END ||
'CONNECTION LIMIT ' || COALESCE(rolconnlimit, -1) || ';' as create_role_statement
FROM pg_roles
WHERE rolname NOT LIKE 'pg_%'
ORDER BY rolname;
```

### Apply Roles to Xata Branch

1. **Connect to your Xata branch**:
```bash
psql `xata branch url`
```

2. **Execute the role creation statements** from the previous step

## Initialize Xata Project

Set up your Xata project configuration:
Expand Down
Loading