lemmy/crates/db_schema/src/impls
dullbananas 4ba6221e04
Move SQL triggers from migrations into reusable sql file (#4333)
* stuff

* stuff including batch_upsert function

* stuff

* do things

* stuff

* different timestamps

* stuff

* Revert changes to comment.rs

* Update comment.rs

* Update comment.rs

* Update post_view.rs

* Update utils.rs

* Update up.sql

* Update up.sql

* Update down.sql

* Update up.sql

* Update main.rs

* use anyhow macro

* Create down.sql

* Create up.sql

* Create replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update utils.rs

* Update .woodpecker.yml

* Update sql_format_check.sh

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Create dump_schema.sh

* Update start_dev_db.sh

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* stuff

* Update replaceable_schema.sql

* Update .pg_format

* fmt

* stuff

* stuff (#21)

* Update replaceable_schema.sql

* Update up.sql

* Update replaceable_schema.sql

* fmt

* update cargo.lock

* stuff

* Update replaceable_schema.sql

* Remove truncate trigger because truncate is already restricted by foreign keys

* Update replaceable_schema.sql

* fix some things

* Update replaceable_schema.sql

* Update replaceable_schema.sql

* Update .woodpecker.yml

* stuff

* fix TG_OP

* Psql env vars

* try to fix combine_transition_tables parse error

* Revert "try to fix combine_transition_tables parse error"

This reverts commit 75d00a4626.

* refactor combine_transition_tables

* try to fix create_triggers

* fix some things

* try to fix combined_transition_tables

* fix sql errors

* update comment count in post trigger

* fmt

* Revert "fmt"

This reverts commit a5bcd0834b.

* Revert "update comment count in post trigger"

This reverts commit 0066a4b42b.

* fix everything

* Update replaceable_schema.sql

* actually fix everything

* refactor create_triggers

* fix

* add semicolons

* add is_counted function and fix incorrect bool operator in update_comment_count_from_post

* refactor comment trigger

* refactor post trigger

* fix

* Delete crates/db_schema/src/utils/series.rs

* subscribers_local

* edit migrations

* move migrations

* remove utils::series module declaration

* fix everything

* stuff

* Move sql to schema_setup dir

* utils.sql

* delete .pg_format

* Update .woodpecker.yml

* Update sql_format_check.sh

* Update .woodpecker.yml

* Merge remote-tracking branch 'upstream/main' into bliss

* fmt

* Create main.rs

* Update lib.rs

* Update main.rs

* Update .woodpecker.yml

* Update main.rs

* Update Cargo.toml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update triggers.sql

* YAY

* Update mod.rs

* Update Cargo.toml

* a

* Update Cargo.toml

* Update Cargo.toml

* Delete crates/db_schema/src/main.rs

* Update Cargo.toml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update utils.sql

* Update utils.sql

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update down.sql

* Update up.sql

* Update triggers.sql

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update triggers.sql

* Update down.sql

* Update .woodpecker.yml

* Update Cargo.toml

* Update .woodpecker.yml

* Update Cargo.toml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update .woodpecker.yml

* Update mod.rs

* Update Cargo.toml

* Update mod.rs

* make dump_schema.sh executable

* fix dump_schema.sh

* defer

* diff dumps

* fmt

* Update utils.sql

* Update .woodpecker.yml

* use correct version for pg_dump

* Update .woodpecker.yml

* Update .woodpecker.yml

* change migration date

* atomic site_aggregates insert

* temporarily repeat tests in CI

* drop r schema in CI migration check

* show ReceivedActivity::create error

* move check_diesel_migration CI step

* Update .woodpecker.yml

* Update scheduled_tasks.rs

* Update scheduled_tasks.rs

* update cargo.lock

* move sql files

* move rank functions

* filter post_aggregates update

* fmt

* cargo fmt

* replace post_id with id

* update cargo.lock

* avoid locking rows that need no change in up.sql

* only run replaceable_schema if migrations were run

* debug ci test failure

* make replaceable_schema work in CI

* Update .woodpecker.yml

* remove println

* Use migration revert and git checkout

* Update schema_setup.rs

* Fix

* Update schema_setup.rs

* Update schema_setup.rs

* Update .woodpecker.yml

---------

Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-04-17 20:58:44 -04:00
..
activity.rs Move SQL triggers from migrations into reusable sql file (#4333) 2024-04-17 20:58:44 -04:00
actor_language.rs Convert all Result<..., LemmyError> into LemmyResult<...> Fixes #4613 (#4614) 2024-04-10 10:14:11 -04:00
captcha_answer.rs Fixing some clippy and woodpecker lints. (#4565) 2024-03-26 10:17:42 +01:00
comment.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
comment_reply.rs chore: fix some comments (#4637) 2024-04-17 14:35:54 +02:00
comment_report.rs Auto resolve reports on removing a comment or post. Fixes #4390 (#4402) 2024-02-15 08:52:04 -05:00
community.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
community_block.rs Remove id column and use different primary key on some tables (#4093) 2023-11-13 08:14:07 -05:00
custom_emoji.rs Make functions work with both connection and pool (#3420) 2023-07-11 09:09:59 -04:00
email_verification.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
federation_allowlist.rs Fixing some clippy and woodpecker lints. (#4565) 2024-03-26 10:17:42 +01:00
federation_blocklist.rs Make functions work with both connection and pool (#3420) 2023-07-11 09:09:59 -04:00
federation_queue_state.rs add federation queue state to get_federated_instances api (#4104) 2023-11-06 16:07:04 -05:00
images.rs Creating a LocalImageView, so that front ends have the Person struct. (#4631) 2024-04-16 19:20:44 -04:00
instance.rs chore: fix some comments (#4637) 2024-04-17 14:35:54 +02:00
instance_block.rs Remove id column and use different primary key on some tables (#4093) 2023-11-13 08:14:07 -05:00
language.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
local_site.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
local_site_rate_limit.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
local_site_url_blocklist.rs Add a blocklist for URLs. (#4515) 2024-03-15 07:03:29 -04:00
local_user.rs On registration, automatically set content languages from `accept-language` header (#4550) 2024-03-25 16:02:12 -04:00
local_user_vote_display_mode.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
login_token.rs Remove id column and use different primary key on some tables (#4093) 2023-11-13 08:14:07 -05:00
mod.rs Add a blocklist for URLs. (#4515) 2024-03-15 07:03:29 -04:00
moderator.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
password_reset_request.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
person.rs chore: fix some comments (#4637) 2024-04-17 14:35:54 +02:00
person_block.rs Remove id column and use different primary key on some tables (#4093) 2023-11-13 08:14:07 -05:00
person_mention.rs chore: fix some comments (#4637) 2024-04-17 14:35:54 +02:00
post.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
post_report.rs Fixing some clippy and woodpecker lints. (#4565) 2024-03-26 10:17:42 +01:00
private_message.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
private_message_report.rs chore: fix some comments (#4637) 2024-04-17 14:35:54 +02:00
registration_application.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
secret.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
site.rs Make all single-fetch database calls return an Option. (#4617) 2024-04-16 14:48:15 +02:00
tagline.rs Make functions work with both connection and pool (#3420) 2023-07-11 09:09:59 -04:00