Skip to content

Commit

Permalink
Fixed links for sql scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dejavix committed Jan 11, 2024
1 parent 3c1e9a1 commit 10f12d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/repository/generic/generic-audit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ This also makes the inspection of the values in the columns easier.
== Audit tables

Audit logs are stored in five tables whose structure is described in code block below (part of DB script for H2 database).
You can find table structures for different DB vendors in out link:https://github.com/Evolveum/midpoint/tree/master/config/sql/generic-old[git],
or in the distribution packages in the folder `doc/config/sql/generic-old`.
You can find table structures for different DB vendors in out link:https://github.com/Evolveum/midpoint/tree/master/config/sql/generic[git],
or in the distribution packages in the folder `doc/config/sql/generic`.

* `id` column in `m_audit_event` table is now generated by default (auto increment).

Expand Down
8 changes: 4 additions & 4 deletions docs/repository/generic/ms-sql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ if we want to run tests (which is likely).

Alternatively we can wget the files from GitHub directly:
----
wget https://raw.githubusercontent.com/Evolveum/midpoint/master/config/sql/generic-old/sqlserver-4.5-all.sql
wget https://github.com/Evolveum/midpoint/raw/master/config/sql/generic/sqlserver-4.9-all.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/master/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql
# now let's use them:
/opt/mssql-tools/bin/sqlcmd -I -b -S localhost -U midtest -P password -d midtest -i sqlserver-4.5-all.sql -i sqlserver.sql
/opt/mssql-tools/bin/sqlcmd -I -b -S localhost -U midtest -P password -d midtest -i sqlserver-4.9-all.sql -i sqlserver.sql
----


Or for `support-4.4` it would look like this:
Or for `support-4.8` it would look like this:
----
wget https://raw.githubusercontent.com/Evolveum/midpoint/support-4.4/config/sql/generic-old/sqlserver-4.4-all.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/generic/sqlserver-4.8-all.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/support-4.4/repo/repo-sql-impl-test/sql-procedures/sqlserver.sql
# now let's use them:
/opt/mssql-tools/bin/sqlcmd -I -b -S localhost -U midtest -P password -d midtest -i sqlserver-4.4-all.sql -i sqlserver.sql
Expand Down
14 changes: 7 additions & 7 deletions docs/repository/native-audit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ This also makes the inspection of the values in the columns easier.
== Audit tables

Audit logs are stored in the tables structured as shown below.
You can find current schema script for audit in link:https://github.com/Evolveum/midpoint/blob/master/config/sql/native-new/postgres-new-audit.sql[git],
or in the distribution packages in the file `doc/config/sql/native-new/postgres-new-audit.sql`.
You can find current schema script for audit in link:https://github.com/Evolveum/midpoint/blob/master/config/sql/native/postgres-audit.sql[git],
or in the distribution packages in the file `doc/config/sql/native/postgres-audit.sql`.

.Native PostgreSQL audit tables
image::images/native-tables-audit.png[]
Expand Down Expand Up @@ -212,12 +212,12 @@ If you don't do this, audit events will be written normally, but non-unique IDs

=== Upgrading

To upgrade the audit database, run the provided `postgres-new-upgrade-audit.sql` anytime, it should be safe.
To upgrade the audit database, run the provided `postgres-audit-upgrade.sql` anytime, it should be safe.
It always runs only the missing parts of the upgrade process.
Be sure you're running the upgrade script provided with the version you're actually using, see
xref:/midpoint/reference/upgrade/database-schema-upgrade/#upgrading-native-postgresql-repository[database schema upgrade].

You can find further details in the source code documentation for `apply_audit_change` procedure in the `postgres-new-audit.sql` script.
You can find further details in the source code documentation for `apply_audit_change` procedure in the `postgres-audit.sql` script.

== Partitioning

Expand Down Expand Up @@ -256,8 +256,8 @@ The whole point of _declarative partitioning_ is that you do not need to care ab

=== Creating partitions

MidPoint offers an SQL procedure `audit_create_monthly_partitions` that is declared in `postgres-new-audit.sql`
(current version https://github.com/Evolveum/midpoint/blob/master/config/sql/native-new/postgres-new-audit.sql[here]).
MidPoint offers an SQL procedure `audit_create_monthly_partitions` that is declared in `postgres-audit.sql`
(current version https://github.com/Evolveum/midpoint/blob/master/config/sql/native/postgres-audit.sql[here]).
As the name suggests, it creates monthly partitions which is quite fine-grained and is easy to utilize,
whether your cleanup is executed monthly, quarterly or yearly.

Expand Down Expand Up @@ -776,4 +776,4 @@ although the default settings do release unused physical connections.

* https://www.postgresql.org/docs/current/ddl-partitioning.html[PostgreSQL Table Partitioning]
* https://jdbc.postgresql.org/documentation/head/connect.html[Connecting to the PostgreSQL Database]
* https://github.com/Evolveum/midpoint/blob/master/config/sql/native-new/postgres-new-audit.sql[postgres-new-audit.sql] on GitHub
* https://github.com/Evolveum/midpoint/blob/master/config/sql/native/postgres-audit.sql[postgres-audit.sql] on GitHub
4 changes: 2 additions & 2 deletions docs/upgrade/upgrade-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ based on PostgreSQL, one can upgrade the database using the `psql` tool
[source,bash]
----
psql -v ON_ERROR_STOP=1 -h localhost -U midpoint -W -d midpoint \
-f postgres-new-upgrade.sql -f postgres-new-upgrade-audit.sql
-f postgres-upgrade.sql -f postgres-upgrade-audit.sql
----

[IMPORTANT]
Expand Down Expand Up @@ -327,4 +327,4 @@ The recommendation for inexperienced engineers is to use long-term support (LTS)

* xref:/midpoint/reference/upgrade/database-schema-upgrade/[Database Schema Upgrade]

* xref:/midpoint/reference/upgrade/upgradeability/[Upgradeability]
* xref:/midpoint/reference/upgrade/upgradeability/[Upgradeability]

0 comments on commit 10f12d3

Please sign in to comment.