Skip to content

Updated table names for DFS setup #2804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 5.0
Choose a base branch
from
Open
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
26 changes: 13 additions & 13 deletions docs/infrastructure_and_maintenance/clustering/clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ Depending on which database you're using:

or

`DATABASE_URL=postgresql://root:[email protected]:3306/ibexa_dfs?serverVersion=8.0`
`DATABASE_URL=postgresql://root:[email protected]:5432/ibexa_dfs?serverVersion=14.18`

For production, it's recommended to create the DFS table in its own database, manually importing its schema definition:

!!! note "dfs_schema.sql (MySQL)"

``` sql
CREATE TABLE ezdfsfile (
CREATE TABLE ibexa_dfs_file (
name text NOT NULL,
name_trunk text NOT NULL,
name_hash varchar(34) NOT NULL DEFAULT '',
Expand All @@ -105,17 +105,17 @@ For production, it's recommended to create the DFS table in its own database, ma
expired tinyint(1) NOT NULL DEFAULT '0',
status tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (name_hash),
KEY ezdfsfile_name (name (191)),
KEY ezdfsfile_name_trunk (name_trunk (191)),
KEY ezdfsfile_mtime (mtime),
KEY ezdfsfile_expired_name (expired,name (191))
KEY ibexa_dfs_file_name (name (191)),
KEY ibexa_dfs_file_name_trunk (name_trunk (191)),
KEY ibexa_dfs_file_mtime (mtime),
KEY ibexa_dfs_file_expired_name (expired,name (191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```

!!! note "dfs_schema.sql (PostgreSQL)"

``` sql
CREATE TABLE ezdfsfile (
CREATE TABLE ibexa_dfs_file (
name_hash varchar(34) DEFAULT '' NOT NULL,
name text NOT NULL,
name_trunk text NOT NULL,
Expand All @@ -127,13 +127,13 @@ For production, it's recommended to create the DFS table in its own database, ma
status boolean DEFAULT false NOT NULL
);

ALTER TABLE ONLY ezdfsfile
ADD CONSTRAINT ezdfsfile_pkey PRIMARY KEY (name_hash);
ALTER TABLE ONLY ibexa_dfs_file
ADD CONSTRAINT ibexa_dfs_file_pkey PRIMARY KEY (name_hash);

CREATE INDEX ezdfsfile_expired_name ON ezdfsfile USING btree (expired, name);
CREATE INDEX ezdfsfile_mtime ON ezdfsfile USING btree (mtime);
CREATE INDEX ezdfsfile_name ON ezdfsfile USING btree (name);
CREATE INDEX ezdfsfile_name_trunk ON ezdfsfile USING btree (name_trunk);
CREATE INDEX ibexa_dfs_file_expired_name ON ibexa_dfs_file USING btree (expired, name);
CREATE INDEX ibexa_dfs_file_mtime ON ibexa_dfs_file USING btree (mtime);
CREATE INDEX ibexa_dfs_file_name ON ibexa_dfs_file USING btree (name);
CREATE INDEX ibexa_dfs_file_name_trunk ON ibexa_dfs_file USING btree (name_trunk);
```

!!! note
Expand Down
Loading