mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-06-25 07:27:42 +00:00
.dev, repo, backend, +4: add 483 files
Verified changes: - add .dev/dev-token.txt - add .dev/pids/backend.pid - add .dev/pids/frontend.pid - add .env.example - add .gitignore - add CONTRIBUTING.md - add DEPLOYMENT.md - add README.md - add WORKFLOW.md - add backend/.env.example - add backend/.sqlx/query-00649c07335338a85657781bfe97b299039883e1170687d60047ced9f3271b8f.json - add backend/.sqlx/query-00b25a5d76ada968ebb490cdfa9b30d82de7402bda296872eb4a366bd2942640.json - add backend/.sqlx/query-00c90349026ba6858b28e413cff2e1b71f87d06dea5759fb6159da22a995e341.json - add backend/.sqlx/query-00e2f11aa7f20e01f9a9de158b81fbcd5a33511135ce3e05aea3c8c8846239b3.json - add backend/.sqlx/query-03706c8c7d9db6d3112ccbd27fd026308c5a03a923f53331468cc899eff9a08d.json - add backend/.sqlx/query-03b9920a00f57083543abd69b18965bdb37d21ba503691cd054ed06f6807d7f7.json - add backend/.sqlx/query-0474f023ed456e56e6a744f8a94e4afc361456a4979e1d14378d1f475c1b2192.json - add backend/.sqlx/query-04c1f2a6a596b9cda5a0744b941777916a3aa3c03445ce59a5a3a69f869078de.json - add backend/.sqlx/query-0569967ce647a065b60b93a233bd222d7dc8aef1eeffec8796dae06968faf08d.json - add backend/.sqlx/query-05ab322014e6f15af99d2af3c118f0cf64b06f311b17ff3c7197d949bab2a580.json - add backend/.sqlx/query-05d8db279bba917c2456ca3427876caefc67b9b6a3d9031ab43f998462a75a58.json - add backend/.sqlx/query-06415d7e9b1b54bc96b8c35b6c92649ffe74f1d9047c783810c344c75f3b10af.json - add backend/.sqlx/query-06c276dfa8e0d19cf539d9abdd4699b387c4a8435c11ac1fe7c4a53d5c231ba6.json - add backend/.sqlx/query-075e3c636c51526e7ceab5540cccd87e52939da3a48e4a544fe67457e8de6962.json - add backend/.sqlx/query-098ff8cc94787edf79a98396716cb5296547c407516489b5b873dadfa360f91e.json - add backend/.sqlx/query-09e0a994d85ba6589db1c989f193ef10e081ccc560031a056e80cb19436f5e8e.json - add backend/.sqlx/query-0cec90f8ac9b48f22ca24330afb16c9308998ddd30404d2a1eb38bd8d0fa46be.json - add backend/.sqlx/query-0d3765f6d5135140d623f9dc706b6907686b98158d775978709db26486109d8b.json - add backend/.sqlx/query-0d79d19ab27c1962afc4ef802f386e160c4a555ca59bade20c901d7b8be99d0e.json - add backend/.sqlx/query-0e518900101ca3ba736e18a911a07759368f0481b3c0dcd4702c077cdadb7ef0.json - add backend/.sqlx/query-0ea2a972775b14b5a22edb7b7a81f414993d8153aebd7121acbcbd54257f32bf.json - add backend/.sqlx/query-0ef338c61969938be731e6187b77c4d7454c409079ecc073aa24a10d339b47f1.json - add backend/.sqlx/query-10649f88f5a0055a0aa23cad37d0b51bd24c35ab290c412bad1286c0baaefd56.json - add backend/.sqlx/query-10a632674ed7d086243d8a31abcb4935677106be2937daf876b01434fc07d293.json - add backend/.sqlx/query-117802a0a1de4ec2e5e3e7d2fd557421991b07876c7b42760bbe756b979d0e96.json - add backend/.sqlx/query-132ee5d7ab197b3a1d3bce2740f419e3cc2311e3cf0bbd0dfe821eebb4ca4fe0.json - add backend/.sqlx/query-1414a9b0037bc888daa0b1215e88a78b20c7e2c614760f36307a248be45203ff.json - add backend/.sqlx/query-14514b4a260abf4b93429a3d841bea19693db589ad668279d7361f499fe7e408.json - add backend/.sqlx/query-150c49c9bd09af829b05abd06d6217aec3ed104f6286e2fc6bd741512cd254ff.json - add backend/.sqlx/query-155f20f35f5b4df59e1a53d0aa30f2994b0a6f76fcd1ff443a6bbe13e3d41339.json - add backend/.sqlx/query-1648eb605182a87a4fadd7158f7012dfe8011a56d63ea069a53bfd697bcdd166.json - add backend/.sqlx/query-171bd1d2e58286b428275404fbaaaedab5d2ee9d3c0b76e3182b6fd48493cdc4.json - add backend/.sqlx/query-174c2a9d861710b570536d1350b4e70b13a9290b222eb89ce753a5702de63f0a.json - add backend/.sqlx/query-177d2a77cdaaa75e32bae953e520231ce713d5fb5f65f533660c773417be085a.json - add backend/.sqlx/query-18c0fb05da45a3eea514f660bc4ac4d6aca71442645666a9c08db8f2a564ff6c.json - add backend/.sqlx/query-18f2bb2a5454308a0ca13ad574947eaa83e52ab32ba48687f54cdce41b34a141.json - add backend/.sqlx/query-1ad83f237ca18e09dfac8f654b6befac12576bf30f35f3bf626b7ccf46a4fb94.json - add backend/.sqlx/query-1cf0926848f8f1fc1f62337b344f06d86408f94450fe0ed80a44268657e92c06.json - add backend/.sqlx/query-1dcd2fc713e43bb6e785befc420fe94db65d42df35bd8015c550c2f8666664e7.json - add backend/.sqlx/query-1dedda4e97c32d56c88d29a247f788e5aac67cc9bc59fdd52b40926af3e5a671.json - add backend/.sqlx/query-1efa9b54dff5200841ab35a40e525a8d0da40edca89aa78cd168ae3e854eabc2.json - add backend/.sqlx/query-1fd0e024053913d7598c5cdb19f407cfa7fef149553e18efc9e5149dd77e7f1c.json - add backend/.sqlx/query-20414e126202ce893b8e967c585ac6ee9c6cc869033bbe7bbf959d80dcedf82b.json - add backend/.sqlx/query-21412c1fff5f48e1ca0a5a67c49180efba50cdbc247a467474296f00a4f1f0f2.json - add backend/.sqlx/query-222ef714ee6f0d715f09643cff679f1c9d5132051dea4cf1f809f06470ed9b44.json - add backend/.sqlx/query-2376b5dff203895eb0b78454a323beb8a90d4ea20ca201226d4b228a2b846c4f.json - add backend/.sqlx/query-274cc3e62a3bc6659ae9e652d6ac15076f76a5fb7acad44f5e853678cfa2abf3.json - add backend/.sqlx/query-27723721585f30329494e2c80e4851b65cd980780e4b756019f73df0f9d28061.json - add backend/.sqlx/query-28654edaba50887bd4c7f698e538ed9ec70543b1ba6d0ecc5b675a1040148b6a.json - add backend/.sqlx/query-2a13dcd10626c05bfed533ba131e46f2ba7c132c9e5d58afe30ba11179096bce.json - add backend/.sqlx/query-2a288385b0b4f402803e22171965bedeeb6e40308d09f4a0d4f67258b11f7cd2.json - add backend/.sqlx/query-2a7e168921469392cdde35401ab602fdb281f995ad75050af27a4130c311a920.json - add backend/.sqlx/query-2b38c2a93dda00a2ccd0ffe3d2cd83b9cf41d444b6f09b211a57dd6689a9e27e.json - add backend/.sqlx/query-2c9bb8a5dca54ef476b2908dfad34371f6f34e4a8500f855d01209d32840f683.json - add backend/.sqlx/query-2ca4dcd48f294e84793ad46b960657a7d30cf790418baf4feab371fb45687627.json - add backend/.sqlx/query-2cb27026dc438da39c4132e9679d8312ed4909560135b5660c82e06ed61e6436.json - add backend/.sqlx/query-2d6f151a2ed11e1a6efecfe1c1cd0242e3e28942cfbae4db71b4d9d709f96522.json - add backend/.sqlx/query-2f7f1f0d1960020529d167240c56abc5bcc6fcd5615890279d2bafcde467fe61.json - add backend/.sqlx/query-2f80cf2d27e9af290578740b2752a6a0d8c41e62aab523e16cc8cf123e59166f.json - add backend/.sqlx/query-31639da003249b784d3603126cb36a1ea592bd819b8f43d9cbd192d7d405c44d.json - add backend/.sqlx/query-3167dfbfa487a695ad0953ed59b206fe16833cfe890fdae3fd74d6fe2d11ced5.json - add backend/.sqlx/query-3205e4cb752317923752ee9ace04a93ada7aa8cbfc97a87f9ddf6376dc102146.json - add backend/.sqlx/query-3271a11a6d1ad3cc05deda6d3e33bd350180c0b20da49b88c5bc04d5f06eb927.json - add backend/.sqlx/query-32e740982952a1d3756117f496bcff626f7bcb438a50fa8eef80e013a84e8048.json - add backend/.sqlx/query-3316c52a6ddc9891f4482e6f5df622147b1be87d0723bf709d6d7def94eb1a0c.json - add backend/.sqlx/query-33281e190171ace099ef3209d49ac42b6527824947520336d7d11594ab56b265.json - add backend/.sqlx/query-34ac1a3b360d0e99c80d59aad7497794803b0ca05cb498e7715344bc9d512084.json - add backend/.sqlx/query-35b2d2fb4f7db1ce97557c01de71c96e64862e3955e1e2d5996581eb4b871f3d.json - add backend/.sqlx/query-3647ec42782a77237f075f172b4d435ac8d6325e60696018386ef1509e499a6d.json - add backend/.sqlx/query-39926d0308364c2a13c987adbc8b364253e9d8d350d69a1e1d3efd1c2e424d81.json - add backend/.sqlx/query-3a395c6e9a23a87fbfa1b3d7a06fbe907b32e3cfb6af327cec1533b7762bd4cd.json - add backend/.sqlx/query-3a8154bdd76daa157200feea1cce96d67bdb7b7c824088ca625105e96495938f.json - add backend/.sqlx/query-3b034411e6338ddaeae97589f0d0ab13cd674f852ad61b643a2e593d252767f1.json - add backend/.sqlx/query-3c118e418b94a2d609cde609b53fbbb1a0055fe46397599f7c5eade17b0a5360.json - add backend/.sqlx/query-3c323153097726bf967b733fc7cb40173a1c64a4b7535a904445e5d02dbe2f0f.json - add backend/.sqlx/query-3c47d27c939cb21fbcc621825d1ef59d5284c3b6db07e2b11d772fefbcf1650b.json - add backend/.sqlx/query-3c769ff42e6b6e2df033fa05cf6d8ae1e9fba6320943f65c95613f56a8ea2a13.json - add backend/.sqlx/query-3d523a0728ea6e9df275520675e3caab1963c61d5d6c3ad468cc51568d4bb5f8.json - add backend/.sqlx/query-3d9153f242fa24637d71a4b4f0a76edee15892248acb6b281ffdbab11a4bff0f.json - add backend/.sqlx/query-3e0e0fe2c4e51b68025965560101643e7e035b782b1cd0d110803664c5831fe3.json - add backend/.sqlx/query-3e7754fe4fe21c7fc50435ad222ed68617f8e8c4f2a21b202ee95d6f76ae0d32.json - add backend/.sqlx/query-403544e4819bc7bcc4ac51c997fb9ec74c3b3fa2c6f2b170ab5b8c8c1d9c65d4.json - add backend/.sqlx/query-41273682b6b15534294e7f90907c7a516cb658e276a50b44f72a2b739ee9e04b.json - add backend/.sqlx/query-42e0fab065d541e407129d44f86f1d1d46387494b992c81f7a334e72c42c98ca.json - add backend/.sqlx/query-43a864f79078c6891186f1d20600983ee080a7033137c0d715880cf20fc7776a.json - add backend/.sqlx/query-4619c7159d4bec14be35a308b0a867e3d5b0687a46a456adf6e8dcd1582d3849.json - add backend/.sqlx/query-47ea00355af927b41b9c39e55791042049a4bea2d1fab669b4ef6fee3f7a3497.json - add backend/.sqlx/query-47ea0156899876339e02f4769e666c24d5d0fee1f18869d7adcb4aeb007076c8.json - add backend/.sqlx/query-484e7ea64028000ccadd135f9806fd190f860d8ac1cd1c56828fa5be279f57c9.json - add backend/.sqlx/query-4a92221917041b95e9a27e511ca70b404313e7dba1faf19bb1eb1347b2208587.json - add backend/.sqlx/query-4aa9e85bb2280a67f94914b3de749b262b16223d467464079ce36509b857f306.json - add backend/.sqlx/query-4cc6b7b3343bf2afda642707ede4a1e1df7904a137b6b3c34bfdda71088516b7.json - add backend/.sqlx/query-4ce35bd4ce5c2dde738b87eb3aa45c21926d67e156fda5cbdcaa5e1db2ebe785.json - add backend/.sqlx/query-4e324f0141e12a57df99f729cccf6133014b6669bda8d3b75ca07bb2a47567b2.json - add backend/.sqlx/query-4ed6eff19ec25d1e627ff27d656934c56ac363260ba540fc0d225b7ce7da48d3.json - add backend/.sqlx/query-4f6d0f4d874780e2729f6e6f2e50ba35dddf8cfaa1de0f4213e2ca70aad2d3cc.json - add backend/.sqlx/query-4fbe1a8019228d78f6b2361fd7f363b8f4ee2e63104c7a824e289d13b4814e51.json - add backend/.sqlx/query-502a8e2b5a59105bcc6d1d668d47b04d7978dde7265c76ae37915f8ae8842033.json - add backend/.sqlx/query-50c17bb1a4d6b249e39d8d13c2ac7d346bfc2476e7c983223e9b4366b2f08abd.json - add backend/.sqlx/query-522c64c31796d1d85b4ce6a6cbac86d0b440c2eb54d14fd700fd005848e4b146.json - add backend/.sqlx/query-5303a6a8c505e05aca3e158cf4aae36c2ad5a98374032d3eb604363f777def7e.json - add backend/.sqlx/query-536866ecf3349598d172c0011a0970a0f7926658d166a4940fca89cabaf3d514.json - add backend/.sqlx/query-53e54a4fe0344eb04f52ac7d737663b824bbfc3c65e3cebd23ff3dfa5a89fbe8.json - add backend/.sqlx/query-54262c9a793fdbf907f81f6974d4fa57bbd4140b6bd9fc84b27f4abcdc9cefc4.json - add backend/.sqlx/query-563efcefcb6880c075c16d278b11631166fc30678c161bdff1a68b8f491bf335.json - add backend/.sqlx/query-56a3e0906a82b4c7df2d066194300d7c5c704562990cf7d835541083884d192e.json - add backend/.sqlx/query-56be8018a90784cb6868af7bd4a7dff4e1e8ddf09e6d08b97c2e0cc3a6dec0e5.json - add backend/.sqlx/query-598da730fbfa2531c8882c1456f8e1a13c6a99c177109e6a88b44e66e923e8f0.json - add backend/.sqlx/query-599b54e38d5be790010a42f8db1cdd210506243f533fe02b90974c51d878ef52.json - add backend/.sqlx/query-5ae8c8c64a800b7735ab381b7ff73988ec35b8839beb5f108400e1e85295aaa8.json - add backend/.sqlx/query-5b3990eadd408f017c3f97f9eec54ebf9d4b17e8f52b7be7e8d4f7a4d4303045.json - add backend/.sqlx/query-5bf7ea39ce22f5466a08746b98091b897f35a72561e668a1643d63c9427a96ca.json - add backend/.sqlx/query-5c54f1d4567d6c7baf6969687c7f19f71dfdcacebdcbcb5284b0243cc12895e2.json - add backend/.sqlx/query-5d369c593b73b9c9835ef79206367824f5cc656cb8d93d3a4af3262c73cf88ad.json - add backend/.sqlx/query-5ea4e4b2dafd654c306e4507faaa1d7112461cedba992f8d2ddc923c42cd7b6b.json - add backend/.sqlx/query-5fd1b28bc068dc4592e1c6a58bd348f4d9feae00d29ea677ae643593dda852a4.json - add backend/.sqlx/query-5ff99236c732a045c53789220aa54f9f494aa49b1b55b207ba777e9cbc2e8ddd.json - add backend/.sqlx/query-6098a745505990aea4405d2ab48fd8e4839518f714261bc8fc1cc01fe298ffd1.json - add backend/.sqlx/query-6252da4b5dd1636fb1aa75dc10bd8ede8f9b12fdb80b0edaa999c321993233ae.json - add backend/.sqlx/query-633a36b68dd39b0e443b169ac7bcfeebbd2e8b76a09791f8f3bd5190bdc569e3.json - add backend/.sqlx/query-63426c52f6016b030b23a562fe2aa08793ecb5e3a3a24f82bc7666cd8cf5cd68.json - add backend/.sqlx/query-641be20c2834a02a49f6c658663d73fb5779eb14e36cf13a9ecbfa61440c5332.json - add backend/.sqlx/query-65a8781dff58442082a16c731be5acfdb3c61ad599b2031433be6c554821df05.json - add backend/.sqlx/query-660253bf0225d065ae50eab8625e1f9662779997acef345182ce23e96efde2c3.json - add backend/.sqlx/query-68f175d74997d4cfc1ce98756bb32d8f7d3466d5ea71f137ac101ebd07e0073e.json - add backend/.sqlx/query-6a6bec68b35012df41e6bb99b5afc11a90e3404fa29698fb04fa3ad18ad2025b.json - add backend/.sqlx/query-6b3fef1781daf9672ad11cbc1e2d84e536ff7ee9b3cef4d5f517a2ed27c586c4.json - add backend/.sqlx/query-6d1c9e2cb972dbc9df0a72034cf0390e72bb8baecd2b09d8ae305ab3844439a0.json - add backend/.sqlx/query-6dc1dc04d2084400be320aa33507746a38814325f3525dd0f38e05c6a64f1f7a.json - add backend/.sqlx/query-6e44a5f3076d976fdad560f5c4ccb1802df408602aecb3025b851969ff480708.json - add backend/.sqlx/query-6e60bcb9d941716127a4ed3cead4b9a375deb0e4238137d3b095c43bae316702.json - add backend/.sqlx/query-6e71eb3247a4b255a2187731a9d54c4fe2aac97e458c1247b8b89364ff590b9f.json - add backend/.sqlx/query-6f89b8deda1078080ad8cfc2db507325e19bb0ffd02f1aa4f933045633c4914a.json - add backend/.sqlx/query-6f92eb099a3182a7f862df97a6f9cf340bef74f512099000e03450f69b796ef1.json - add backend/.sqlx/query-706d61211ccde2d45e1fc60480b37719f90ce364bf3a118743bfe82eca3783ae.json - add backend/.sqlx/query-7148baad9c5cba418a5d7818761e3ac52fe166fbfa0bfc5f6bbe749fa0a6889e.json - add backend/.sqlx/query-72132fbc4c6da619b3055bd473b5928c8a1ff7886a613d9d6be3f2ab2a7a7f4d.json - add backend/.sqlx/query-733ab1cda0fdc0cecf46928410fefb3b4e96eb2390dfdb93b95ce4c13f0d9e59.json - add backend/.sqlx/query-733faae97d10baca47579a4a56ce281a6f36a60c73739f9ad692fc8b3825964c.json - add backend/.sqlx/query-73720cd6ae56d7e210c173ca90f6c982f68150b76dc2d4cd578965c62ddb11be.json - add backend/.sqlx/query-73e84e079e38064cbf573149243395913f6a14bbaceedeff7bf41fdcaf63f01c.json - add backend/.sqlx/query-740f728d9932a5da47b6b9454ed77304f5e93dc836dc21b3994eb4e7c8bc8219.json - add backend/.sqlx/query-74fdd241eb54952015786937b057d437b60267d664cd4b57a9c394486f6001b2.json - add backend/.sqlx/query-75a8631bc9e4f89b9e1b6d1899711e148228dfa0a6760fbba7ddf2711fb16e6e.json - add backend/.sqlx/query-7635e7f06daac3a495a2439bc893e345effd96be4a8760d4ca11538334d875c4.json - add backend/.sqlx/query-768935f0dff24d092ebaff3512026b9e6a0344c9d10ee0cf852d299c80bba6c8.json - add backend/.sqlx/query-778a5cc33f4b205914711921c98653f826d2adc8175c9297efb485caf4c3d96d.json - add backend/.sqlx/query-78418e5f9824bceb1937348a77d50ced7a3e2f21ec72940fe9a70e77cb3923a0.json - add backend/.sqlx/query-7a3f67d8cafc3611f94a8cb2406ab4c0e90a3619f7b9e4b6ad67fe11a46b91d9.json - add backend/.sqlx/query-7b06af69ee03943c64083e5bc94cb6dbd6f5017ad44546dff7582c31345edc51.json - add backend/.sqlx/query-7c8ec9e26f553fc211b5bd819e31722a054bb9414950d16a8ebd451dc18d4f3b.json - add backend/.sqlx/query-7cc78deb0836ac802b017122ac50fe71bbe8af86c7aa5c8b90b10d1672a9d31a.json - add backend/.sqlx/query-7cf8e3b8f83a16c49ce2f7e66673d69e773f71abded50c5bb29884f9dff628bd.json - add backend/.sqlx/query-7f0faa7ca48a6a56274f7d05c1fb4ad2d8dd384fdb7bc178220f07481236c8b2.json - add backend/.sqlx/query-7f497e0097bf329922d709282092b588975f7c2d8c508fbe49ab3d9d4c99c396.json - add backend/.sqlx/query-7fdca4a1f7c40789d44de54a739eca0bb898c9fbf3e89784e2f784630c56dba5.json - add backend/.sqlx/query-82aa3e3878c98cbdcc5bbefd11acd7b19521314a38ab9085516eb81e39354d2a.json - add backend/.sqlx/query-860d54897714862bf6312fc00b440d414b9083efd695f04c31f26510d0254208.json - add backend/.sqlx/query-865245efea368b2c0b937356889a07b9a04954165e700f4c7c35687c13f2be27.json - add backend/.sqlx/query-86645359fb0da9b7441326acb5ac4d8be2c0eda7f3ef0d97d0b4d661aa0d62eb.json - add backend/.sqlx/query-87426464ee1ed01c4e1940b86ed461af98bcfe50c40df7c869c1c03395a79e07.json - add backend/.sqlx/query-87f52f0262716fe497a6e8b42722cc11f88dacaa0bca746ebd5b474a734d9bb3.json - add backend/.sqlx/query-88ca29971ada21e0ff2b92315e39c7aefbd81215862c5c7149e2dbca93c5d1fe.json - add backend/.sqlx/query-8932b373514ebf8056f5934c5b02dd675f6fe1b1317688676d5c32e1f01065a7.json - add backend/.sqlx/query-89804ccea9075b137f7c7e47917f3477f770dfd7550ab97060b981849618a201.json - add backend/.sqlx/query-8b2ab82dd4fe83655e074b1edc9e80e2ca276a327e044ad5578fb15eba3ac3ee.json - add backend/.sqlx/query-8d3042b1d0415262c8729e52a4d8933bf52b484798b7e3530219b0117a60f5d1.json - add backend/.sqlx/query-8d94635535054f82b5185372543c7347a8fe98d8402d99130a29520eab53bc73.json - add backend/.sqlx/query-8db75a6ddf63baa3ee89defbedaefb53f61892395025de17dce21451f81ba8b1.json - add backend/.sqlx/query-8e856e6e4081d2ca26e5e6097848fab90e055cbbc318956a3869750a0855fe3f.json - add backend/.sqlx/query-917a021a7c54c19e1257d558ec4e40c0001c975d00af6255ab2707d3ebb045ac.json - add backend/.sqlx/query-91b64087ce497ce4426c00ccdd8cbfde639f18d24df8362c11a211a9acf2fc92.json - add backend/.sqlx/query-92461256ad7b62764b2bd75674ccbfc11df6648d6d856e3e68fc80801457c555.json - add backend/.sqlx/query-93883e88af152aca23a39dadd95669f025294cb532a892e58891a0e756e9c784.json - add backend/.sqlx/query-93c4fe897770127740a52c43b14f2007bfa6faf8743dc07611ac22e9140e89f6.json - add backend/.sqlx/query-942753e2a11713b9d4b46a52f4a6426629f95c7a91598f351741f9bc100e243b.json - add backend/.sqlx/query-94499cff482a1533a32723bc9924bf62af0a9ec7cfe338b1c97336e6a1ea5dee.json - add backend/.sqlx/query-94b98a4fccec6a48b27cdf8d3ea8740a81baac9e53a5c458acb7f9692893f069.json - add backend/.sqlx/query-957b131c5ae23e306fe4634db068c611122ae61057c805c82413fb69ed015c58.json - add backend/.sqlx/query-95f70efea97448688250d1647387c7d3dc1e4eec0dc2e6ba88f09e9746132d09.json - add backend/.sqlx/query-965e42468c325a893d39c2eeefbea254b37e04f0d067d88988cf4ece97b0e818.json - add backend/.sqlx/query-9888b553ae9f5cd32aa1eb6cfee1abecc08787a0f7fd7526956d30d62c1801ff.json - add backend/.sqlx/query-9b9965ea0437e0f8e3467ba2b237d6a84c74bbc03c389117d8f3f6e71273b587.json - add backend/.sqlx/query-9beff9c1f4daa7453bd6f13f3692b320f1f82ca87bed75f8a85e87882ac4bfc1.json - add backend/.sqlx/query-9c3b9cd35a4c58e67a15ad0372c18b6c5fc0a969b9aec88508cea8388c2fbe55.json - add backend/.sqlx/query-9c4016766b52e727103f5d09c7572fa90d793c5b391cfe99809d2d8825b9c9d6.json - add backend/.sqlx/query-9e78a21e3bae2928e4ce353423030c59deb97bdbf242e8d4b8e2af11d65596f1.json - add backend/.sqlx/query-9f011d836f16bc90ba585c43424fbb960ee5cadd5f50088e252655f5f79612fe.json - add backend/.sqlx/query-a1df48d19975013b68c2e57f90a4c0691d7f31a83ffc92628d918959daba3e36.json - add backend/.sqlx/query-a2d2cf6227a9e713d29610e2c0f0e94146f1798257a9dd68325487329eb6e24c.json - add backend/.sqlx/query-a57268c9e448ddc42290fce152a7d81d332eccd8c90b962b7ef0cdaba6d8a3b0.json - add backend/.sqlx/query-a65fb2ba103206d6ad4c761ec1fb62638fc50474679c751183013efc7cb0edbd.json - add backend/.sqlx/query-a8414c7b067366f56d56b3a465b248209e3800c25fcea8dadc2f63fdca72e82f.json - add backend/.sqlx/query-a9d4611cf695893da6a962355b974077340a56497e7bc9100f288cb1195267ad.json - add backend/.sqlx/query-aa35c7c6645c9a7637f083650a2d9c898e15c49cc49a7df001fa6861ab47995e.json - add backend/.sqlx/query-aa69a761eb48721491a2275dc2040ac0d58ce45701dba74214e2af3685db59f1.json - add backend/.sqlx/query-aadb91fe11c7e3106062a2055b0196ca12ed20e40513bc14f11f4a8bd5623a3f.json - add backend/.sqlx/query-ad438c18ca77e186c4e33a8079374181a47fbbec6a5f0ae5fe2144e342910d40.json - add backend/.sqlx/query-ad82dc4820ab69556cba650ae422084d57dec2f89ae99c977be1b36261c8d0b4.json - add backend/.sqlx/query-aeee6c4f9115efe386351097cb8c3512550eeecac893289d40b8e01c04f9f167.json - add backend/.sqlx/query-aefd6f17ea2becd41283f5b07fca49481cbe221437fed57283b0f52c03bf85c7.json - add backend/.sqlx/query-b038e92708c16243759184994795f864db1cabbdf8f0d93128d41850888e531c.json - add backend/.sqlx/query-b09e737c4925f4ebb8fc57919c50542f125f4fc7d2ba49c3cd368682aba9a8b6.json - add backend/.sqlx/query-b3c77106c16c2b75c51a36e6e56f9cff657fce6f0472d905af97ffe5aba8d3c7.json - add backend/.sqlx/query-b42cab53e091470ad8237271def4b42146a75d30b77aecb4c1ae7ab7a7cc32d3.json - add backend/.sqlx/query-b54b3e3f031e9a09d1252bcc9e27ad26959157f77064a4e4d30ed73c3a01e293.json - add backend/.sqlx/query-b5bada0e6df57aa0243e0234b72c3b39cf6f1ee0ef69a4e232ae06f70b1b1c0c.json - add backend/.sqlx/query-b5d49d78ba8674954210df5728d43dca77d453a7aae14fb8b0e57e0f7a44e03a.json - add backend/.sqlx/query-b6bdb63000935a47301993972237254f9b11915a860d6e84ad639f579bb6ac62.json - add backend/.sqlx/query-b6d2983946f27ac29c85e72685d389d29c8ce1b3c9e3202a272f12f2e6dfbf06.json - add backend/.sqlx/query-b7fbd0f031db0653546e51da4237160abe2909f3dcf622f9ab1b91537c9169fa.json - add backend/.sqlx/query-b8ef84a72cfa6cea3a1b1d8cb5916d7e3290de0a05143432151308f32312f94a.json - add backend/.sqlx/query-b8f80a210fcb0474a124ad93e43a163431366c50dce137863b283121ce70604b.json - add backend/.sqlx/query-b94c2ca7181b28660e9a9b256e6ebe98b6cf0c450969b6b953434b8d2775ee4b.json - add backend/.sqlx/query-b9586185e84644f0bd936d7bf5e9bec6ebeaba77ab354d0b7096d9334656497f.json - add backend/.sqlx/query-b9e59dc4e2e37b0c59ebbe794b03e64647af6b6025b3c74c73324b5735e32802.json - add backend/.sqlx/query-bb0cf75500c2358d78ae8028e5d587b9e7492ce6082340ec84f7706d668beb45.json - add backend/.sqlx/query-bbcdcddcd2f31a7e308016f325e9914a10c18cbc05d4b724bb87533cd3851fea.json - add backend/.sqlx/query-bd76cc54f3ccd774a62f6d2b5ab27e5432bc2202b3e8f030a24a1733c96867af.json - add backend/.sqlx/query-bfdd9a0dcf20053b8d10c946955530253502e9c624b6586b358660df9d1ec8cc.json - add backend/.sqlx/query-c2a2d3c0016e6d4df3fd04f9e24c5c4fde0acbe42a195eaf74cf5299dacb846c.json - add backend/.sqlx/query-c2ca1cf0be6dc893f3f6938953436c69408bd8ca37d45398a1faf450684aec08.json - add backend/.sqlx/query-c31ebddef69f304403bfb2d816d42bd9731482ceec258e0de1bb61d5ba20d413.json - add backend/.sqlx/query-c33217c0ec06f08e9b89ac876cb22bf002aadb6cd6391af968d6a08725792228.json - add backend/.sqlx/query-c35608b0d7569f739dda24b3da59b7b500ff26f5e79433b3f7e3625d91177d26.json - add backend/.sqlx/query-c42152b0a4b91fd58afbdb06da1a9b7b73f414bdd6607343df01dc0fa3d4b5fd.json - add backend/.sqlx/query-c4d21db839f7e0b45fc1fc1291840e78d1e92440e003c5ad3cb45c3d9f5042fc.json - add backend/.sqlx/query-c5f66036fe85ebb4597f564dcf40b7547b409195b65ea3130454f96265c9bd82.json - add backend/.sqlx/query-c64fd6da083e54e1719580125eb72a544081ed4c91c02295c6f1d799fb3b4f5a.json - add backend/.sqlx/query-c7525a8aa940491736dd45cd876dab2e4cd0d05f0104e2d2b08980bcee557212.json - add backend/.sqlx/query-cbb4acc6eb730ec886b1af23e6389a0e68d7a672d8643101f6680e42df944711.json - add backend/.sqlx/query-cc77b8a12eb03938d34d391c8b1397dd2fe99748315a95299563c3a2f5c989bf.json - add backend/.sqlx/query-cc97b910b8afcfd348d5fe69f7e75862ddd7e31680e46a61170a467b64cdf547.json - add backend/.sqlx/query-cca54c0742b36cc4b7c3c2bf0bb3d987d16771d42334f11c4e9d7598651d21e6.json - add backend/.sqlx/query-ccf5a42b62f74eeb3d424fc4573ec6b01b1ed46b56518c0ccc5121e524d2f3c5.json - add backend/.sqlx/query-cd002400a4b0c6b071bb949d0c716ab2691caa661ccc407af85da42599e1101b.json - add backend/.sqlx/query-cdb2b8bb16c0e2e04fa6df8e22e060adfc81c38cf67121ada9f6c721a9398588.json - add backend/.sqlx/query-cde649035ebc12f0bbce749e9a5347b8073659b42c9e65a4ac74400b17dc38f7.json - add backend/.sqlx/query-ce7f978d16864a568b49c47eaa68edcaafb0d293f6d08f5a945bd456c91fd417.json - add backend/.sqlx/query-cf9a5a22ac9e4ab44a56d2aa4e110a63ba212d392a353850a344f69a0a13811f.json - add backend/.sqlx/query-d00ba1f23877ca15a8ac8b09d55fc86a37d40c9a0ea63afdbfa2f725fa39d255.json - add backend/.sqlx/query-d09299b064ef5fefd5f5ac8a7f1ae1a549cfffd9081fa72b4427fa4ea21cbcb5.json - add backend/.sqlx/query-d0c599e01228531f2ab7f571658c71563fd1ad88cfa5e13f1adfaad3f00eaa75.json - add backend/.sqlx/query-d2de711bc12629a1141d11db45496d22c0ff03555c983205b512a318290948a0.json - add backend/.sqlx/query-d32e84b6ce21f4b4553aead45ef53dce4362399a75c39f7203cbd770e997abdf.json - add backend/.sqlx/query-d48c21b6a8d67db4b37ee43d6273e3d41d1cf2a2b89fe434edd009a29e69b94c.json - add backend/.sqlx/query-d705da303937bc5e1a2e929b9cf3f93e4e24b55e1dd14c4a83bca29f0d3a0341.json - add backend/.sqlx/query-d83b8a3f417cd420d44aa3f7f8c462b28c2f7f2a4804ba00bb51a63759a7f8b2.json - add backend/.sqlx/query-d928c488809305d28f877c359c93614550307868213d312ea8ae24bcbb927db5.json - add backend/.sqlx/query-da70570e2492dcc5b21ff51069db1a366ff94803b0cfa5821c497b6ba06ed2fc.json - add backend/.sqlx/query-db38e6387cbf510bf0c13ecee0f42afc7c100aebd0b043fd23424cfe61110e3a.json - add backend/.sqlx/query-dbf52d447a84d9f1a7f36f3c57c05b1c547bd8515706b2be877762edd1aff254.json - add backend/.sqlx/query-dc64e1d25d9ced3a49130cee99f6edc3f70a4917910cf3b76faefc24ac32159d.json - add backend/.sqlx/query-dccbd661ee975b7e9b74d175c452fbd3ba2c847c24c6f401fd18736aeaed3ad3.json - add backend/.sqlx/query-dd458a825f2295d6650263f39ed6f22d1da12443b80bd53a4b6c61e870b4cf07.json - add backend/.sqlx/query-dd4e31b27b005a68baeacf0ada1645ebe2277a8c437d6846db1776b53611aa2e.json - add backend/.sqlx/query-dd99e48b1572e25db38f03da95984fda1072913b29bb6b3753a0d351583dfff6.json - add backend/.sqlx/query-de3230de507ca1e11d2ca40bef8a5b8470628ddbaa454af4f49f6fe6953f9014.json - add backend/.sqlx/query-de6d39c5473742a38ff437b95613ae32a366f4339c8165f58d192151024b6caf.json - add backend/.sqlx/query-dee9b81f66d0a8a8ec6543e2bda43b68604377280236f83eec9bb710c4a8b957.json - add backend/.sqlx/query-df3c9235defd412e75b967ec4c1d052404a6289ec89ebc3cf7524f0a65279258.json - add backend/.sqlx/query-df917df33b1f18f0545d866fdcdbff3c189c549e3e92966b808166ebd65a758e.json - add backend/.sqlx/query-e078bd7e0e60f80321173ea5383e3c89f5b07036b7f6c3be6a66e25dd64d8790.json - add backend/.sqlx/query-e15d8685afde9f89919d3643dd1df3d4718d826147e63be4c8d4e8708a15e481.json - add backend/.sqlx/query-e1a40a1cc7c618d815ebfaec6751ab19146ab76519020ce783bc916e64155a14.json - add backend/.sqlx/query-e25c2c4e795fd113fbf9631b4fc107d217f2dd0a8eacd812067defe8d3529d54.json - add backend/.sqlx/query-e2a9b8f8fb63c4e8737c0f2925ffeff025be37184ede64b328e0ecd68680dc08.json - add backend/.sqlx/query-e3e45d1876b1a38771e1bb32eda68462ba27bd0beca41a602ebf60b86b863680.json - add backend/.sqlx/query-e53f34921983218ba03123ea07403917a62cb0fc66039be84387df090606eefc.json - add backend/.sqlx/query-e5ada1e1857eec30e7c2a55c19b0ddbf2c90fc7f0019f211549f2abfc4fdf487.json - add backend/.sqlx/query-e70b6cc45322a8ba1c3e9fef0c8c3185bbeacbcbf16810c303c029ea108802bf.json - add backend/.sqlx/query-e983f01536d1ed4b6b40d640877d9fa445aa04972cfe427116cbdf104e6cb32f.json - add backend/.sqlx/query-ea775b89fed8c652e57e21cd202dbb9c4d13dedc7d0890dd1d13dfa7635f02b5.json - add backend/.sqlx/query-ea7e6d82c94b562d5e75720c8c1af6ad707ef717406330be0c4255363f9c783d.json - add backend/.sqlx/query-eab47df4e85e9dfeb87b480dc092b09924d6239ba71b8715be5c56137ebca953.json - add backend/.sqlx/query-ec156d9abd97de863483a1d8fe3e4ff63a63b39f883d320175c88b0bcaad3f70.json - add backend/.sqlx/query-ec34b2dc8930568c2e135aa13d08783d7b62dd524eef99f00b8bebd55f0196bd.json - add backend/.sqlx/query-ed05dcba73fd4426c2de9c8828d943e45eafa31dbb155c4a50b2471308dd3097.json - add backend/.sqlx/query-ef47b9016770614a3d12c6bba1c99b60046a3bff47ca5e18759786362446e1be.json - add backend/.sqlx/query-f10d14593a49a3f14536b6ec7a0283b16f57a731f18f1ea00a25b76aeda238cb.json - add backend/.sqlx/query-f1de9db0b037bd44be7aa37b308ce60a0c10888951f385b61fe237e09b924976.json - add backend/.sqlx/query-f45f95ec5c791d1bd87635f304f62caf19b12dc178c570828a8bb8a5579ea17a.json - add backend/.sqlx/query-f5476f8976f2c0ab202fe52ea148d95570f6e3901f6ef0637e58701eb42d0120.json - add backend/.sqlx/query-f5d1ab63c42cd0e45cfab56f5f4efd821816137eacf138aa5191dbe47c5bd444.json - add backend/.sqlx/query-f63fca5359b5dc0141d7de8e8f4c3ec1e7b446d48ab6d175c8b876823bd042a9.json - add backend/.sqlx/query-f7bb4e7ba6e7a6abb1549bc112176ca7afdb25923aa3aae3775a65cbd17afeaa.json - add backend/.sqlx/query-f91db2c61f14281c7dfd6f6aefdffc97e080dd9acc5d9c5edd8a865623b44628.json - add backend/.sqlx/query-f9ff82cdb66393d4fdef38cf4e64b93b9f8b062f06cd3f7bde3b0873ecbfc835.json - add backend/.sqlx/query-facfb30591b5abfa384d897e0de7c5d0f0e9f80cf8c6e57a1c5298ad1a990351.json - add backend/.sqlx/query-faf3d877c077b20211fe2cbf92c54322660147ab31fe5036e3e722725c2e3e44.json - add backend/.sqlx/query-fb2e03f8ccf37e8463ee7f14e74fc20fdb46337da0f561b4fa0eb815fb0486b4.json - add backend/.sqlx/query-fcdb75aee759125fdb4169e6c9dd2b47b4f264c512bd62db700083cf479d6d3f.json - add backend/.sqlx/query-fdfe11a59054df6111a7833043bf8cfb772c5897d1aa9c25ccad0579945e74f2.json - add backend/.sqlx/query-fe3dbfffdaca1dcf828be7cc949f7f74b05f694dc8ef3ee37a3dac8f695ec62d.json - add backend/.sqlx/query-fe5ef9f6c10dfb61e236bc955d377dd8b0893e052ee073b55fbb1b8f745a9cd5.json - add backend/Cargo.toml - add backend/Dockerfile - add backend/migrations/20260125180102_initial_schema.sql - add backend/migrations/20260125181224_voting_system.sql - add backend/migrations/20260125183611_comments.sql - add backend/migrations/20260125204900_notifications.sql - add backend/migrations/20260125205600_advanced_voting.sql - add backend/migrations/20260125211000_public_events.sql - add backend/migrations/20260126012000_plugin_packages.sql - add backend/migrations/20260126120000_instance_settings.sql - add backend/migrations/20260126121000_admin_columns.sql - add backend/migrations/20260126130000_deliberation_system.sql - add backend/migrations/20260126140000_advanced_voting.sql - add backend/migrations/20260126150000_liquid_delegation.sql - add backend/migrations/20260126160000_plugin_registry.sql - add backend/migrations/20260126170000_gitlab_integration.sql - add backend/migrations/20260126180000_roles_permissions.sql - add backend/migrations/20260126190000_voting_plugins.sql - add backend/migrations/20260126200000_invitations.sql - add backend/migrations/20260126210000_plugin_kv_store.sql - add backend/migrations/20260126220000_approval_workflows.sql - add backend/migrations/20260126230000_vote_reproducibility.sql - add backend/migrations/20260126240000_topic_voting_methods.sql - add backend/migrations/20260126250000_moderation_ledger.sql - add backend/migrations/20260126260000_decision_workflows.sql - add backend/migrations/20260126270000_self_moderation_rules.sql - add backend/migrations/20260126280000_proposal_lifecycle.sql - add backend/migrations/20260126290000_governance_analytics.sql - add backend/migrations/20260126300000_conflict_resolution.sql - add backend/migrations/20260126310000_structured_deliberation.sql - add backend/migrations/20260126320000_public_data_export.sql - add backend/migrations/20260126330000_federation.sql - add backend/migrations/20260127105000_wasm_plugin_runtime.sql - add backend/migrations/20260127150000_demo_seed_data.sql - add backend/src/api/analytics.rs - add backend/src/api/approvals.rs - add backend/src/api/auth.rs - add backend/src/api/comments.rs - add backend/src/api/communities.rs - add backend/src/api/conflicts.rs - add backend/src/api/delegation.rs - add backend/src/api/deliberation.rs - add backend/src/api/demo.rs - add backend/src/api/exports.rs - add backend/src/api/federation.rs - add backend/src/api/gitlab.rs - add backend/src/api/health.rs - add backend/src/api/invitations.rs - add backend/src/api/lifecycle.rs - add backend/src/api/mod.rs - add backend/src/api/moderation.rs - add backend/src/api/moderation_ledger.rs - add backend/src/api/notifications.rs - add backend/src/api/permissions.rs - add backend/src/api/plugins.rs - add backend/src/api/proposals.rs - add backend/src/api/roles.rs - add backend/src/api/self_moderation.rs - add backend/src/api/settings.rs - add backend/src/api/users.rs - add backend/src/api/voting_config.rs - add backend/src/api/workflows.rs - add backend/src/auth/jwt.rs - add backend/src/auth/middleware.rs - add backend/src/auth/mod.rs - add backend/src/auth/password.rs - add backend/src/config/mod.rs - add backend/src/db/mod.rs - add backend/src/demo/mod.rs - add backend/src/main.rs - add backend/src/models/community.rs - add backend/src/models/mod.rs - add backend/src/models/proposal.rs - add backend/src/models/user.rs - add backend/src/plugins/builtin/comment_notifications.rs - add backend/src/plugins/builtin/conflict_resolution.rs - add backend/src/plugins/builtin/decision_workflows.rs - add backend/src/plugins/builtin/federation.rs - add backend/src/plugins/builtin/governance_analytics.rs - add backend/src/plugins/builtin/mod.rs - add backend/src/plugins/builtin/moderation_ledger.rs - add backend/src/plugins/builtin/proposal_lifecycle.rs - add backend/src/plugins/builtin/public_data_export.rs - add backend/src/plugins/builtin/self_moderation.rs - add backend/src/plugins/builtin/structured_deliberation.rs - add backend/src/plugins/hooks.rs - add backend/src/plugins/manager.rs - add backend/src/plugins/mod.rs - add backend/src/plugins/wasm/host_api.rs - add backend/src/plugins/wasm/mod.rs - add backend/src/plugins/wasm/plugin.rs - add backend/src/plugins/wasm/runtime.rs - add backend/src/voting/mod.rs - add backend/src/voting/quadratic.rs - add backend/src/voting/ranked_choice.rs - add backend/src/voting/schulze.rs - add backend/src/voting/star.rs - add compose/.env.demo.example - add compose/.env.production.example - add compose/demo.yml - add compose/dev.yml - add compose/production.yml - add docs/README.md - add docs/admin/backup.md - add docs/admin/configuration.md - add docs/admin/database.md - add docs/admin/installation.md - add docs/admin/plugins.md - add docs/admin/security.md - add docs/reference/api.md - add docs/reference/glossary.md - add docs/reference/voting-methods.md - add docs/user/communities.md - add docs/user/delegation.md - add docs/user/getting-started.md - add docs/user/settings.md - add docs/user/voting.md - add frontend/.gitignore - add frontend/Dockerfile - add frontend/astro.config.mjs - add frontend/package-lock.json - add frontend/package.json - add frontend/public/favicon.ico - add frontend/public/favicon.svg - add frontend/src/components/AdminNav.astro - add frontend/src/components/ThemeSwitcher.astro - add frontend/src/components/icons/VotingIcons.astro - add frontend/src/components/moderation/LedgerViewer.astro - add frontend/src/components/voting/DelegationGraph.astro - add frontend/src/components/voting/VotingMethodCard.astro - add frontend/src/components/voting/VotingResultsChart.astro - add frontend/src/layouts/Layout.astro - add frontend/src/layouts/PublicLayout.astro - add frontend/src/lib/api.ts - add frontend/src/lib/themes.ts - add frontend/src/pages/about.astro - add frontend/src/pages/admin/approvals.astro - add frontend/src/pages/admin/invitations.astro - add frontend/src/pages/admin/plugins.astro - add frontend/src/pages/admin/roles.astro - add frontend/src/pages/admin/settings.astro - add frontend/src/pages/admin/voting.astro - add frontend/src/pages/communities.astro - add frontend/src/pages/communities/[slug]/index.astro - add frontend/src/pages/communities/[slug]/plugins.astro - add frontend/src/pages/communities/[slug]/proposals/index.astro - add frontend/src/pages/communities/[slug]/proposals/new.astro - add frontend/src/pages/communities/[slug]/settings.astro - add frontend/src/pages/communities/[slug]/voting-config.astro - add frontend/src/pages/communities/new.astro - add frontend/src/pages/dashboard.astro - add frontend/src/pages/delegations.astro - add frontend/src/pages/demo.astro - add frontend/src/pages/docs.astro - add frontend/src/pages/features.astro - add frontend/src/pages/index.astro - add frontend/src/pages/login.astro - add frontend/src/pages/manifesto.astro - add frontend/src/pages/notifications.astro - add frontend/src/pages/proposals.astro - add frontend/src/pages/proposals/[id].astro - add frontend/src/pages/register.astro - add frontend/src/pages/settings.astro - add frontend/src/pages/setup.astro - add frontend/src/pages/users/[username].astro - add frontend/tsconfig.json - add scripts/.dev/state.json - add scripts/demo-reset.ps1 - add scripts/demo-reset.sh - add scripts/dev-start.ps1 - add scripts/dev-start.sh - add scripts/dev-stop.ps1 - add scripts/dev-stop.sh - add scripts/dev-test.ps1 - add scripts/dev.ps1 - add scripts/dev.sh - add scripts/post-reboot-setup.ps1 - add scripts/prepare-production.ps1 Diffstat: - 483 files changed, 61980 insertions(+)
This commit is contained in:
commit
8e94bcf577
483 changed files with 61980 additions and 0 deletions
1
.dev/dev-token.txt
Normal file
1
.dev/dev-token.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNWRjNGQ2OS1mOGMxLTRjNTEtYTE2Yy1iMThhYzIyMmNkMzEiLCJ1c2VybmFtZSI6ImRldmFkbWluIiwiZXhwIjoxNzY5NTA1MjA2LCJpYXQiOjE3Njk0MTg4MDZ9.eWgwHPFLUE71RNi8KF1rDkOtECLxRsal6rnl0hMQfZQ
|
||||
1
.dev/pids/backend.pid
Normal file
1
.dev/pids/backend.pid
Normal file
|
|
@ -0,0 +1 @@
|
|||
10488
|
||||
1
.dev/pids/frontend.pid
Normal file
1
.dev/pids/frontend.pid
Normal file
|
|
@ -0,0 +1 @@
|
|||
12944
|
||||
4
.env.example
Normal file
4
.env.example
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
DATABASE_URL=postgres://likwid:likwid@localhost:5432/likwid
|
||||
POSTGRES_USER=likwid
|
||||
POSTGRES_PASSWORD=likwid
|
||||
POSTGRES_DB=likwid
|
||||
49
.gitignore
vendored
Normal file
49
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Rust
|
||||
/backend/target/
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
|
||||
# Node
|
||||
/frontend/node_modules/
|
||||
/frontend/dist/
|
||||
/frontend/.astro/
|
||||
|
||||
# Environment
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
backend/.env
|
||||
|
||||
# Development state
|
||||
.dev/
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Podman
|
||||
.podman/
|
||||
|
||||
# Internal development documentation (not for public)
|
||||
/docu_dev/
|
||||
|
||||
# Compose environment files (contain secrets)
|
||||
/compose/.env.production
|
||||
/compose/.env.demo
|
||||
|
||||
# Database
|
||||
*.sql.backup
|
||||
|
||||
# Build artifacts
|
||||
*.dump
|
||||
*.dump.gz
|
||||
208
CONTRIBUTING.md
Normal file
208
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
# Contributing to Likwid
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Development Environment
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
**All Platforms:**
|
||||
- Git
|
||||
- Rust (via rustup) — latest stable
|
||||
- Node.js LTS (20.x+)
|
||||
- Podman (for database)
|
||||
|
||||
**Windows:**
|
||||
- WSL2 enabled
|
||||
- Podman Desktop with WSL2 backend
|
||||
- MSVC toolchain for Rust
|
||||
|
||||
**Linux:**
|
||||
- podman-compose
|
||||
|
||||
### Quick Setup
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://codeberg.org/likwid/likwid
|
||||
cd likwid
|
||||
|
||||
# Copy environment configuration
|
||||
cp .env.example .env
|
||||
|
||||
# Start development environment
|
||||
# Windows:
|
||||
.\scripts\dev-start.ps1
|
||||
|
||||
# Linux:
|
||||
./scripts/dev-start.sh
|
||||
```
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
likwid/
|
||||
├── backend/ # Rust backend (Axum)
|
||||
│ ├── src/
|
||||
│ │ ├── api/ # HTTP endpoints
|
||||
│ │ ├── auth/ # Authentication
|
||||
│ │ ├── models/ # Database models
|
||||
│ │ └── plugins/ # Plugin system
|
||||
│ └── migrations/ # SQLx migrations
|
||||
├── frontend/ # Astro frontend
|
||||
│ └── src/
|
||||
│ ├── pages/ # Routes
|
||||
│ ├── layouts/ # Page templates
|
||||
│ └── components/# Reusable UI
|
||||
├── scripts/ # Dev scripts
|
||||
└── compose/ # Container configs
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Branch Naming
|
||||
|
||||
- `feature/description` — New features
|
||||
- `fix/description` — Bug fixes
|
||||
- `docs/description` — Documentation
|
||||
- `refactor/description` — Code refactoring
|
||||
|
||||
```
|
||||
type(scope): description
|
||||
|
||||
[optional body]
|
||||
|
||||
[optional footer]
|
||||
```
|
||||
|
||||
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
|
||||
|
||||
**Examples:**
|
||||
```
|
||||
feat(voting): implement Schulze method
|
||||
fix(auth): correct JWT expiration handling
|
||||
docs(readme): add Voting System info
|
||||
```
|
||||
|
||||
### Code Style
|
||||
|
||||
#### Rust (Backend)
|
||||
|
||||
- Follow `rustfmt` defaults
|
||||
- Use `clippy` for linting
|
||||
- Document public APIs with `///` comments
|
||||
- Prefer `Result<T, E>` over panics
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
cargo fmt --check
|
||||
cargo clippy
|
||||
```
|
||||
|
||||
#### TypeScript (Frontend)
|
||||
|
||||
- Strict mode enabled
|
||||
- Use TypeScript for all new code
|
||||
- Follow Astro conventions
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
npm run check
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
# Backend tests
|
||||
cd backend
|
||||
cargo test
|
||||
|
||||
# Frontend checks
|
||||
cd frontend
|
||||
npm run check
|
||||
```
|
||||
|
||||
### Database Migrations
|
||||
|
||||
We use SQLx for compile-time checked queries:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
|
||||
# Create a new migration
|
||||
sqlx migrate add description_of_change
|
||||
|
||||
# Run migrations
|
||||
sqlx migrate run
|
||||
|
||||
# Prepare offline query data (for CI)
|
||||
cargo sqlx prepare
|
||||
```
|
||||
|
||||
## Contributing Guidelines
|
||||
|
||||
### Before You Start
|
||||
|
||||
1. **Check existing issues** — Someone may already be working on it
|
||||
2. **Open an issue first** — For significant changes, discuss before coding
|
||||
3. **Keep changes focused** — One feature/fix per merge request
|
||||
|
||||
### Submitting Changes
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Ensure tests pass
|
||||
5. Submit a merge request
|
||||
|
||||
### Merge Request Checklist
|
||||
|
||||
- [ ] Code follows project style
|
||||
- [ ] Tests added/updated
|
||||
- [ ] Documentation updated
|
||||
- [ ] Commit messages follow conventions
|
||||
- [ ] No unrelated changes
|
||||
|
||||
|
||||
### Find a Third Way
|
||||
|
||||
When opinions conflict, seek solutions that satisfy everyone rather than taking sides. The best outcomes come from understanding all perspectives.
|
||||
|
||||
### Be Pragmatic
|
||||
|
||||
We value tangible results over theoretical debates. If something works and improves the project, it's worth considering.
|
||||
|
||||
### Support Each Other
|
||||
|
||||
Help newcomers, answer questions patiently, and remember that everyone was new once.
|
||||
|
||||
## Areas for Contribution
|
||||
|
||||
### High Priority
|
||||
- Advanced voting methods (Schulze, STAR, Quadratic)
|
||||
- Liquid delegation engine
|
||||
- Accessibility improvements
|
||||
- Mobile responsiveness
|
||||
- Internationalization (i18n)
|
||||
|
||||
### Plugin Development
|
||||
- Create new plugins for the WASM runtime
|
||||
- Improve plugin documentation
|
||||
- Build integrations (GitLab, Matrix, etc.)
|
||||
|
||||
### Documentation
|
||||
- User guides
|
||||
- API documentation
|
||||
- Tutorial videos
|
||||
- Translations
|
||||
|
||||
### Design
|
||||
- UI/UX improvements
|
||||
- Icon design
|
||||
- Theme development
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree that your contributions will be licensed under LGPL-2.1-or-later.
|
||||
|
||||
---
|
||||
188
DEPLOYMENT.md
Normal file
188
DEPLOYMENT.md
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
# Likwid Deployment Guide
|
||||
|
||||
Likwid supports two distinct deployment modes: **Production** and **Demo**. These are separate instances with their own databases.
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ PRODUCTION │
|
||||
│ ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
|
||||
│ │ Frontend │───▶│ Backend │───▶│ PostgreSQL (prod_db) │ │
|
||||
│ │ :4321 │ │ :3000 │ │ :5432 │ │
|
||||
│ └──────────┘ └──────────┘ └──────────────────────┘ │
|
||||
│ DEMO_MODE=false │ No demo data │ Clean database │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ DEMO │
|
||||
│ ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │
|
||||
│ │ Frontend │───▶│ Backend │───▶│ PostgreSQL (demo_db) │ │
|
||||
│ │ :4322 │ │ :3001 │ │ :5433 │ │
|
||||
│ └──────────┘ └──────────┘ └──────────────────────┘ │
|
||||
│ DEMO_MODE=true │ Seed data │ Resettable database │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Production Deployment
|
||||
|
||||
```bash
|
||||
# 1. Copy and configure environment
|
||||
cp compose/.env.production.example compose/.env.production
|
||||
|
||||
# 2. Edit .env.production with secure values
|
||||
# - Set strong POSTGRES_PASSWORD
|
||||
# - Set random JWT_SECRET (64+ chars)
|
||||
# - Set your domain in API_BASE
|
||||
|
||||
# 3. Remove demo seed migration (important!)
|
||||
rm backend/migrations/20260127150000_demo_seed_data.sql
|
||||
|
||||
# 4. Deploy
|
||||
cd compose
|
||||
podman-compose --env-file .env.production -f production.yml up -d
|
||||
|
||||
# 5. Access at http://localhost:4321
|
||||
```
|
||||
|
||||
### Demo Deployment
|
||||
|
||||
```bash
|
||||
# 1. Copy environment (defaults are fine for demo)
|
||||
cp compose/.env.demo.example compose/.env.demo
|
||||
|
||||
# 2. Deploy
|
||||
cd compose
|
||||
podman-compose --env-file .env.demo -f demo.yml up -d
|
||||
|
||||
# 3. Access at http://localhost:4322
|
||||
```
|
||||
|
||||
## Demo Instance Details
|
||||
|
||||
### Demo Accounts
|
||||
|
||||
| Username | Password | Role |
|
||||
|-------------|----------|------------------------------|
|
||||
| contributor | demo123 | Standard member |
|
||||
| moderator | demo123 | Can moderate content |
|
||||
| observer | demo123 | Read-only access |
|
||||
|
||||
### Pre-seeded Data
|
||||
|
||||
- **3 Communities**
|
||||
- Aurora Framework (tech/OSS governance)
|
||||
- Civic Commons Network (civic engagement)
|
||||
- Regional Makers Collective (federated makerspaces)
|
||||
|
||||
- **13 Users** with realistic profiles
|
||||
|
||||
- **7 Proposals** in various states (draft, discussion, voting, closed)
|
||||
|
||||
- **Delegation relationships** demonstrating liquid democracy
|
||||
|
||||
- **Moderation history** showing governance in action
|
||||
|
||||
### Resetting Demo
|
||||
|
||||
To reset the demo to a clean state:
|
||||
|
||||
```bash
|
||||
# Windows
|
||||
.\scripts\demo-reset.ps1
|
||||
|
||||
# Linux/macOS
|
||||
./scripts/demo-reset.sh
|
||||
|
||||
# Or manually:
|
||||
podman-compose -f compose/demo.yml down -v
|
||||
podman-compose --env-file .env.demo -f compose/demo.yml up -d
|
||||
```
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Production Default | Demo Default | Description |
|
||||
|-------------------|-------------------|---------------------------|--------------------------------|
|
||||
| POSTGRES_USER | likwid | likwid_demo | Database username |
|
||||
| POSTGRES_PASSWORD | (required) | demo_secret_change_me | Database password |
|
||||
| POSTGRES_DB | likwid_prod | likwid_demo | Database name |
|
||||
| DB_PORT | 5432 | 5433 | Database port |
|
||||
| JWT_SECRET | (required) | demo_jwt_secret_... | JWT signing secret |
|
||||
| BACKEND_PORT | 3000 | 3001 | Backend API port |
|
||||
| FRONTEND_PORT | 4321 | 4322 | Frontend port |
|
||||
| API_BASE | (your domain) | http://localhost:3001 | Public API URL |
|
||||
| DEMO_MODE | false | true | Enable demo features |
|
||||
|
||||
### Demo Mode Features
|
||||
|
||||
When `DEMO_MODE=true`:
|
||||
- Demo accounts are recognized and can log in
|
||||
- Destructive actions on demo data are restricted
|
||||
- Reset endpoint available at `/api/demo/reset` (admin only)
|
||||
- Demo status shown at `/api/demo/status`
|
||||
|
||||
## Development Setup
|
||||
|
||||
For local development without containers:
|
||||
|
||||
```bash
|
||||
# 1. Start only the database
|
||||
podman-compose -f compose/dev.yml up -d
|
||||
|
||||
# 2. Run backend natively
|
||||
cd backend
|
||||
cp ../.env.example .env # Configure DATABASE_URL
|
||||
cargo run
|
||||
|
||||
# 3. Run frontend natively
|
||||
cd frontend
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Monitoring & Logs
|
||||
|
||||
```bash
|
||||
# View all logs
|
||||
podman-compose -f compose/demo.yml logs -f
|
||||
|
||||
# View specific service
|
||||
podman-compose -f compose/demo.yml logs -f backend
|
||||
|
||||
# Check health
|
||||
curl http://localhost:3001/health
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Database connection issues
|
||||
```bash
|
||||
# Check if postgres is running
|
||||
podman-compose -f compose/demo.yml ps
|
||||
|
||||
# View postgres logs
|
||||
podman-compose -f compose/demo.yml logs postgres
|
||||
```
|
||||
|
||||
### Migration failures
|
||||
```bash
|
||||
# Connect to database and check
|
||||
podman exec -it likwid-demo-db psql -U likwid_demo -d likwid_demo
|
||||
|
||||
# List tables
|
||||
\dt
|
||||
|
||||
# Check migration status
|
||||
SELECT * FROM _sqlx_migrations;
|
||||
```
|
||||
|
||||
### Reset everything
|
||||
```bash
|
||||
# Nuclear option - removes all data and volumes
|
||||
podman-compose -f compose/demo.yml down -v
|
||||
podman volume prune -f
|
||||
podman-compose -f compose/demo.yml up -d
|
||||
```
|
||||
158
README.md
Normal file
158
README.md
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
# Likwid - Modular Governance Platform
|
||||
|
||||
**Democracy Design in Practice**
|
||||
|
||||
Likwid is an open-source platform for participatory governance, designed to make collective decision-making accessible, transparent, and genuinely democratic. Built for communities, civic organizations, and any group that values structured deliberation over shouting matches.
|
||||
|
||||
> *"We are citizens of the 21st century, but we rely on institutions designed in the 19th century. The problem is not democracy, it's the interface."*
|
||||
|
||||
## Philosophy
|
||||
|
||||
Likwid implements the principles of **Democracy Design**:
|
||||
|
||||
- **Information must be understandable**, not just available
|
||||
- **Listening matters more than speaking** — structured deliberation over flame wars
|
||||
- **Voting should express nuance** — from simple approval to Schulze and quadratic methods
|
||||
- **Delegation should be fluid** — trust networks that adapt in real-time
|
||||
- **Participation is designed**, not imposed
|
||||
|
||||
## Features
|
||||
|
||||
### Deliberative Democracy
|
||||
- **Inform → Discuss → Decide** workflow for proposals
|
||||
- Resource libraries for informed participation
|
||||
- Small group discussions with facilitators
|
||||
- "Read before discuss" requirements
|
||||
- Constructive comment visibility scoring
|
||||
|
||||
### Advanced Voting Methods
|
||||
- **Approval Voting** — vote for multiple options
|
||||
- **Ranked Choice** — order preferences
|
||||
- **Schulze Method** — Condorcet-consistent pairwise comparison
|
||||
- **STAR Voting** — score + automatic runoff
|
||||
- **Quadratic Voting** — express intensity of preference
|
||||
|
||||
### Liquid Delegation
|
||||
- Delegate your vote by topic or globally
|
||||
- Real-time transparency: see how delegates vote
|
||||
- Revoke delegation instantly
|
||||
- Transitive delegation chains
|
||||
- Delegation analytics and trust networks
|
||||
|
||||
### Modular Plugin System
|
||||
- WASM-based sandboxed plugins
|
||||
- Per-community plugin configuration
|
||||
- Hook-based architecture (actions/filters)
|
||||
- Built-in and third-party plugins
|
||||
- Admin policy for signed/unsigned plugins
|
||||
|
||||
### Governance Infrastructure
|
||||
- Multi-community platform support
|
||||
- Granular admin controls (platform mode, registration, moderation)
|
||||
- Public moderation ledger (immutable)
|
||||
- Role-based access (admin, moderator, facilitator, member)
|
||||
- Anonymous voting with identity separation
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
|-------|------------|
|
||||
| **Backend** | Rust (Axum 0.8, Tokio, SQLx) |
|
||||
| **Frontend** | Astro + TypeScript |
|
||||
| **Database** | PostgreSQL 16 |
|
||||
| **Plugins** | WebAssembly (wasmtime) |
|
||||
| **Containers** | Podman (rootless) |
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
**Windows:**
|
||||
- Windows 10/11 with WSL2
|
||||
- Podman Desktop (WSL2 backend)
|
||||
- Rust (rustup, MSVC toolchain)
|
||||
- Node.js LTS
|
||||
|
||||
**Linux:**
|
||||
- Podman + podman-compose
|
||||
- Rust (rustup)
|
||||
- Node.js LTS
|
||||
|
||||
### Development
|
||||
|
||||
```powershell
|
||||
# 1. Clone and configure
|
||||
git clone https://invent.kde.org/marcoa/likwid.git
|
||||
cd likwid
|
||||
cp .env.example .env
|
||||
|
||||
# 2. Start everything (database + backend + frontend)
|
||||
.\scripts\dev-start.ps1
|
||||
|
||||
# 3. Stop everything
|
||||
.\scripts\dev-stop.ps1
|
||||
```
|
||||
|
||||
The platform will be available at:
|
||||
- **Frontend**: http://localhost:4321
|
||||
- **Backend API**: http://localhost:3000
|
||||
- **Setup Wizard**: http://localhost:4321/setup (first run)
|
||||
|
||||
### First Run
|
||||
|
||||
1. Navigate to `/register` to create the first user (automatically becomes admin)
|
||||
2. Complete platform setup at `/setup`
|
||||
3. Configure instance settings at `/admin/settings`
|
||||
4. Create your first community
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
likwid/
|
||||
├── backend/ # Rust backend
|
||||
│ ├── src/
|
||||
│ │ ├── api/ # REST endpoints
|
||||
│ │ ├── auth/ # JWT authentication
|
||||
│ │ ├── models/ # Database models
|
||||
│ │ └── plugins/ # Plugin system (WASM + builtins)
|
||||
│ └── migrations/ # SQL migrations
|
||||
├── frontend/ # Astro frontend
|
||||
│ ├── src/
|
||||
│ │ ├── pages/ # Routes
|
||||
│ │ ├── layouts/ # Page layouts
|
||||
│ │ └── components/ # UI components
|
||||
├── compose/ # Podman compose files
|
||||
├── scripts/ # Dev scripts (cross-platform)
|
||||
└── docu_dev/ # Design documents
|
||||
```
|
||||
|
||||
### Core Principles
|
||||
|
||||
1. **Be considerate** — Your work affects others
|
||||
2. **Be respectful** — Assume good intentions
|
||||
3. **Be collaborative** — Work transparently
|
||||
4. **Be pragmatic** — Results over debates
|
||||
5. **Find a third way** — Seek solutions that satisfy everyone
|
||||
|
||||
## Roadmap
|
||||
|
||||
- [x] Core voting infrastructure
|
||||
- [x] Plugin system (WASM + builtins)
|
||||
- [x] Deliberation phases
|
||||
- [x] Comment quality scoring
|
||||
- [ ] Advanced voting methods (Schulze, STAR, Quadratic)
|
||||
- [ ] Liquid delegation engine
|
||||
- [ ] GitLab/GitHub integration - plugin
|
||||
- [ ] Mobile-responsive UI
|
||||
- [ ] Accessibility audit (WCAG 2.1)
|
||||
|
||||
## License
|
||||
|
||||
LGPL-2.1-or-later
|
||||
## Acknowledgments
|
||||
|
||||
Inspired by:
|
||||
- [Pol.is](https://pol.is/) — Opinion mapping
|
||||
- [Decidim](https://decidim.org/) — Participatory democracy
|
||||
- [LiquidFeedback](https://liquidfeedback.org/) — Liquid democracy
|
||||
- [Equal Vote Coalition](https://www.equal.vote/) — STAR Voting
|
||||
125
WORKFLOW.md
Normal file
125
WORKFLOW.md
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# Likwid Development Workflow
|
||||
|
||||
## Understanding the Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ SHARED CODEBASE │
|
||||
│ backend/src/* frontend/src/* migrations/* │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌───────────────┴───────────────┐
|
||||
▼ ▼
|
||||
┌─────────────────────┐ ┌─────────────────────┐
|
||||
│ PRODUCTION DB │ │ DEMO DB │
|
||||
│ (likwid_prod) │ │ (likwid_demo) │
|
||||
│ │ │ │
|
||||
│ - No demo users │ │ - Demo users seeded │
|
||||
│ - No seed data │ │ - Full sample data │
|
||||
│ - DEMO_MODE=false │ │ - DEMO_MODE=true │
|
||||
│ - Real user data │ │ - Resettable │
|
||||
└─────────────────────┘ └─────────────────────┘
|
||||
```
|
||||
|
||||
**Key insight**: Code changes affect both. Data is separate.
|
||||
|
||||
## Daily Development Workflow
|
||||
|
||||
### Your current setup IS the demo
|
||||
Your local environment with `DEMO_MODE=true` and the seeded database is functionally equivalent to the demo deployment.
|
||||
|
||||
### Making code changes
|
||||
1. Edit code normally
|
||||
2. Backend auto-reloads (or `cargo run`)
|
||||
3. Frontend hot-reloads (`npm run dev`)
|
||||
4. Test with demo accounts
|
||||
|
||||
### Testing as different users
|
||||
```
|
||||
contributor / demo123 → Standard member experience
|
||||
moderator / demo123 → Moderation features
|
||||
observer / demo123 → Read-only experience
|
||||
```
|
||||
|
||||
## When You Want a Fresh Demo
|
||||
|
||||
### Option 1: Reset database (quick)
|
||||
```powershell
|
||||
# Drop and recreate database
|
||||
cd backend
|
||||
sqlx database drop -y
|
||||
sqlx database create
|
||||
sqlx migrate run
|
||||
```
|
||||
|
||||
### Option 2: Use the reset script (when using containers)
|
||||
```powershell
|
||||
.\scripts\demo-reset.ps1
|
||||
```
|
||||
|
||||
## Deploying for Others
|
||||
|
||||
### For testers/curious users (Demo)
|
||||
```bash
|
||||
# Uses separate database on port 5433, backend on 3001, frontend on 4322
|
||||
cp compose/.env.demo.example compose/.env.demo
|
||||
podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d
|
||||
```
|
||||
|
||||
### For real users (Production)
|
||||
```bash
|
||||
# 1. Remove demo seed data
|
||||
rm backend/migrations/20260127150000_demo_seed_data.sql
|
||||
|
||||
# 2. Configure production
|
||||
cp compose/.env.production.example compose/.env.production
|
||||
# Edit with secure passwords and your domain
|
||||
|
||||
# 3. Deploy
|
||||
podman-compose --env-file compose/.env.production -f compose/production.yml up -d
|
||||
```
|
||||
|
||||
## Common Tasks
|
||||
|
||||
### "I broke the demo data"
|
||||
```powershell
|
||||
cd backend
|
||||
sqlx database drop -y && sqlx database create && sqlx migrate run
|
||||
```
|
||||
|
||||
### "I want to test production-like (no demo data)"
|
||||
```powershell
|
||||
# Temporarily move the demo migration
|
||||
mv backend/migrations/20260127150000_demo_seed_data.sql backend/migrations/20260127150000_demo_seed_data.sql.bak
|
||||
|
||||
# Reset database
|
||||
sqlx database drop -y && sqlx database create && sqlx migrate run
|
||||
|
||||
# Set DEMO_MODE=false in .env
|
||||
```
|
||||
|
||||
### "I want demo data back"
|
||||
```powershell
|
||||
# Restore migration
|
||||
mv backend/migrations/20260127150000_demo_seed_data.sql.bak backend/migrations/20260127150000_demo_seed_data.sql
|
||||
|
||||
# Reset database
|
||||
sqlx database drop -y && sqlx database create && sqlx migrate run
|
||||
|
||||
# Set DEMO_MODE=true in .env
|
||||
```
|
||||
|
||||
### "I want to run both demo and production locally"
|
||||
Use the container deployments - they use different ports:
|
||||
- Demo: localhost:4322 (frontend), localhost:3001 (backend)
|
||||
- Prod: localhost:4321 (frontend), localhost:3000 (backend)
|
||||
|
||||
## Summary
|
||||
|
||||
| Concern | Solution |
|
||||
|---------|----------|
|
||||
| Code changes affect demo? | Yes, same codebase. That's expected. |
|
||||
| Data separation | Different databases (demo vs prod) |
|
||||
| Reset demo | `sqlx database drop && create && migrate` |
|
||||
| Test production locally | Remove demo migration, set DEMO_MODE=false |
|
||||
| Deploy for others | Use compose files with separate DBs |
|
||||
26
backend/.env.example
Normal file
26
backend/.env.example
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Likwid Backend Configuration
|
||||
# Copy this file to .env and configure as needed
|
||||
|
||||
# Database connection URL
|
||||
DATABASE_URL=postgres://likwid:likwid@localhost:5432/likwid
|
||||
|
||||
# Server configuration
|
||||
SERVER_HOST=127.0.0.1
|
||||
SERVER_PORT=3000
|
||||
|
||||
# JWT Secret for authentication tokens
|
||||
# IMPORTANT: Change this in production!
|
||||
JWT_SECRET=change-me-in-production
|
||||
|
||||
# =============================================================================
|
||||
# DEMO MODE
|
||||
# =============================================================================
|
||||
# Enable demo mode for public demonstration instances.
|
||||
# When enabled:
|
||||
# - Restricts destructive actions (delete communities, modify instance settings)
|
||||
# - Enables demo accounts (contributor, moderator, observer) with password: demo123
|
||||
# - Loads seed data with realistic governance history
|
||||
# - Data can be reset via POST /api/demo/reset
|
||||
#
|
||||
# Set to true for demo/showcase instances, false for production
|
||||
DEMO_MODE=false
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO amendment_support (amendment_id, user_id, support_type, comment)\n VALUES ($1, $2, $3, $4)\n ON CONFLICT (amendment_id, user_id) DO UPDATE SET\n support_type = $3,\n comment = $4",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "00649c07335338a85657781bfe97b299039883e1170687d60047ced9f3271b8f"
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT DISTINCT pp.id, pp.name, pp.wasm_bytes, pp.manifest\n FROM plugin_packages pp\n JOIN community_plugin_packages cpp ON cpp.package_id = pp.id\n WHERE cpp.is_active = true\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "wasm_bytes",
|
||||
"type_info": "Bytea"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "manifest",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "00b25a5d76ada968ebb490cdfa9b30d82de7402bda296872eb4a366bd2942640"
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO notifications (user_id, type, title, message, link) VALUES ($1, $2, $3, $4, $5)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Varchar"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "00c90349026ba6858b28e413cff2e1b71f87d06dea5759fb6159da22a995e341"
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, community_id, author_id, title, description, \n status as \"status: _\", voting_method, voting_starts_at, voting_ends_at,\n created_at, updated_at, deliberation_phase as \"deliberation_phase: _\",\n inform_starts_at, inform_ends_at, discuss_starts_at, discuss_ends_at,\n min_read_time_seconds, facilitator_id\n FROM proposals \n WHERE community_id = $1 \n ORDER BY created_at DESC",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "author_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "status: _",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "proposal_status",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"draft",
|
||||
"discussion",
|
||||
"voting",
|
||||
"closed",
|
||||
"archived",
|
||||
"calculating"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "voting_method",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "voting_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "voting_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"name": "updated_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"name": "deliberation_phase: _",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "deliberation_phase",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"drafting",
|
||||
"informing",
|
||||
"discussing",
|
||||
"voting",
|
||||
"concluded"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"name": "inform_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"name": "inform_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"name": "discuss_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"name": "discuss_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"name": "min_read_time_seconds",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"name": "facilitator_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "00e2f11aa7f20e01f9a9de158b81fbcd5a33511135ce3e05aea3c8c8846239b3"
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO rule_violations (\n community_id, rule_id, target_user_id, \n reported_by, report_reason, report_evidence\n ) VALUES ($1, $2, $3, $4, $5, $6)\n RETURNING id",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "03706c8c7d9db6d3112ccbd27fd026308c5a03a923f53331468cc899eff9a08d"
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT user_has_permission($1, $2, $3)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "user_has_permission",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "03b9920a00f57083543abd69b18965bdb37d21ba503691cd054ed06f6807d7f7"
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, community_id, name, slug, description, parent_id\n FROM topics\n WHERE community_id = $1\n ORDER BY name",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "slug",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "parent_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "0474f023ed456e56e6a744f8a94e4afc361456a4979e1d14378d1f475c1b2192"
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT id, type as notification_type, title, message, link, is_read, created_at\n FROM notifications\n WHERE user_id = $1\n ORDER BY created_at DESC\n LIMIT 50\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "notification_type",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "message",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "link",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "is_read",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "04c1f2a6a596b9cda5a0744b941777916a3aa3c03445ce59a5a3a69f869078de"
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO deliberation_reading_log (proposal_id, user_id, first_read_at, reading_time_seconds)\n VALUES ($1, $2, NOW(), $3)\n ON CONFLICT (proposal_id, user_id) DO UPDATE SET\n read_proposal = CASE WHEN $4 = 'proposal' THEN true ELSE deliberation_reading_log.read_proposal END,\n read_summaries = CASE WHEN $4 = 'summaries' THEN true ELSE deliberation_reading_log.read_summaries END,\n read_top_arguments = CASE WHEN $4 = 'arguments' THEN true ELSE deliberation_reading_log.read_top_arguments END,\n reading_time_seconds = deliberation_reading_log.reading_time_seconds + $3,\n updated_at = NOW()",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Int4",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "0569967ce647a065b60b93a233bd222d7dc8aef1eeffec8796dae06968faf08d"
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT c.* FROM communities c\n JOIN community_members cm ON c.id = cm.community_id\n WHERE cm.user_id = $1 AND c.is_active = true\n ORDER BY cm.joined_at DESC\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "slug",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "settings",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "updated_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "created_by",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "05ab322014e6f15af99d2af3c118f0cf64b06f311b17ff3c7197d949bab2a580"
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n id, community_id, title, description,\n conflict_type::text AS \"conflict_type!\",\n status::text AS \"status!\",\n severity_level, is_urgent\n FROM conflict_cases WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "conflict_type!",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "status!",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "severity_level",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "is_urgent",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "05d8db279bba917c2456ca3427876caefc67b9b6a3d9031ab43f998462a75a58"
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO compromise_proposals (\n conflict_id, title, description, proposed_actions,\n proposed_by, proposed_by_role\n ) VALUES ($1, $2, $3, $4, $5, $6)\n RETURNING id",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Jsonb",
|
||||
"Uuid",
|
||||
"Varchar"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "06415d7e9b1b54bc96b8c35b6c92649ffe74f1d9047c783810c344c75f3b10af"
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT author_id, facilitator_id FROM proposals WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "author_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "facilitator_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "06c276dfa8e0d19cf539d9abdd4699b387c4a8435c11ac1fe7c4a53d5c231ba6"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT allow_community_vote FROM community_rules WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "allow_community_vote",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "075e3c636c51526e7ceab5540cccd87e52939da3a48e4a544fe67457e8de6962"
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO quadratic_votes (proposal_id, voter_id, option_id, credits) VALUES ($1, $2, $3, $4)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "098ff8cc94787edf79a98396716cb5296547c407516489b5b873dadfa360f91e"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id FROM workflow_templates \n WHERE community_id = $1 AND is_default = true\n LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "09e0a994d85ba6589db1c989f193ef10e081ccc560031a056e80cb19436f5e8e"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT setup_completed FROM instance_settings LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "setup_completed",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "0cec90f8ac9b48f22ca24330afb16c9308998ddd30404d2a1eb38bd8d0fa46be"
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT registration_enabled, registration_mode FROM instance_settings LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "registration_enabled",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "registration_mode",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "0d3765f6d5135140d623f9dc706b6907686b98158d775978709db26486109d8b"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT is_core FROM default_plugins WHERE plugin_name = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "is_core",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "0d79d19ab27c1962afc4ef802f386e160c4a555ca59bade20c901d7b8be99d0e"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT generate_invitation_code()",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "generate_invitation_code",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "0e518900101ca3ba736e18a911a07759368f0481b3c0dcd4702c077cdadb7ef0"
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE export_jobs SET download_count = download_count + 1 WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "0ea2a972775b14b5a22edb7b7a81f414993d8153aebd7121acbcbd54257f32bf"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT p.name\n FROM plugins p\n JOIN community_plugins cp ON cp.plugin_id = p.id\n WHERE cp.community_id = $1 AND cp.is_active = true AND p.is_active = true",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "0ef338c61969938be731e6187b77c4d7454c409079ecc073aa24a10d339b47f1"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT COUNT(*) FROM notifications WHERE user_id = $1 AND is_read = false",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "count",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "10649f88f5a0055a0aa23cad37d0b51bd24c35ab290c412bad1286c0baaefd56"
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT fp.id, fp.federation_id\n FROM federated_proposals fp\n WHERE fp.local_proposal_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "federation_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "10a632674ed7d086243d8a31abcb4935677106be2937daf876b01434fc07d293"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE compromise_proposals SET\n party_b_response = $2,\n party_b_response_at = NOW(),\n party_b_feedback = $3,\n updated_at = NOW()\n WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "117802a0a1de4ec2e5e3e7d2fd557421991b07876c7b42760bbe756b979d0e96"
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO delegate_profiles (user_id, display_name, bio, accepting_delegations, delegation_policy)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (user_id) DO UPDATE SET \n display_name = COALESCE($2, delegate_profiles.display_name),\n bio = COALESCE($3, delegate_profiles.bio),\n accepting_delegations = COALESCE($4, delegate_profiles.accepting_delegations),\n delegation_policy = COALESCE($5, delegate_profiles.delegation_policy),\n updated_at = NOW()\n RETURNING display_name, bio, accepting_delegations, delegation_policy, \n total_delegators, total_votes_cast",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "display_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "bio",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "accepting_delegations",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "delegation_policy",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "total_delegators",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "total_votes_cast",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Bool",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "132ee5d7ab197b3a1d3bce2740f419e3cc2311e3cf0bbd0dfe821eebb4ca4fe0"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT COUNT(*) FROM community_members WHERE community_id = $1 AND role = 'admin'",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "count",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "1414a9b0037bc888daa0b1215e88a78b20c7e2c614760f36307a248be45203ff"
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n community_id,\n overall_health_score::float8 AS overall_health_score,\n participation_score::float8 AS participation_score,\n efficiency_score::float8 AS efficiency_score,\n delegation_health_score::float8 AS delegation_health_score,\n power_concentration_risk\n FROM governance_health_indicators\n WHERE community_id = $1\n ORDER BY calculated_at DESC\n LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "overall_health_score",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "participation_score",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "efficiency_score",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "delegation_health_score",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "power_concentration_risk",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "14514b4a260abf4b93429a3d841bea19693db589ad668279d7361f499fe7e408"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT COALESCE(\n (SELECT (cp.settings->>'auto_assign_mediators')::boolean\n FROM community_plugins cp\n JOIN plugins p ON p.id = cp.plugin_id\n WHERE cp.community_id = $1 AND p.name = 'conflict_resolution'),\n true\n ) AS \"auto_assign!\"",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "auto_assign!",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "150c49c9bd09af829b05abd06d6217aec3ed104f6286e2fc6bd741512cd254ff"
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n COUNT(*) FILTER (WHERE reaction_type = 'agree') as agree,\n COUNT(*) FILTER (WHERE reaction_type = 'disagree') as disagree,\n COUNT(*) FILTER (WHERE reaction_type = 'insightful') as insightful,\n COUNT(*) FILTER (WHERE reaction_type = 'off_topic') as off_topic,\n COUNT(*) FILTER (WHERE reaction_type = 'constructive') as constructive\n FROM comment_reactions\n WHERE comment_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "agree",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "disagree",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "insightful",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "off_topic",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "constructive",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "155f20f35f5b4df59e1a53d0aa30f2994b0a6f76fcd1ff443a6bbe13e3d41339"
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT community_id, status as \"status: crate::models::ProposalStatus\", voting_method FROM proposals WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "status: crate::models::ProposalStatus",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "proposal_status",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"draft",
|
||||
"discussion",
|
||||
"voting",
|
||||
"closed",
|
||||
"archived",
|
||||
"calculating"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "voting_method",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "1648eb605182a87a4fadd7158f7012dfe8011a56d63ea069a53bfd697bcdd166"
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO mediation_notes (\n conflict_id, session_id, author_id, content, note_type, is_confidential\n ) VALUES ($1, $2, $3, $4, $5, $6)\n RETURNING id",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Varchar",
|
||||
"Bool"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "171bd1d2e58286b428275404fbaaaedab5d2ee9d3c0b76e3182b6fd48493cdc4"
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT v.created_at as voted_at, po.label as option_label,\n p.id as proposal_id, p.title as proposal_title,\n c.name as community_name\n FROM votes v\n JOIN voting_identities vi ON v.voter_id = vi.id\n JOIN proposal_options po ON v.option_id = po.id\n JOIN proposals p ON po.proposal_id = p.id\n JOIN communities c ON p.community_id = c.id\n WHERE vi.user_id = $1\n ORDER BY v.created_at DESC\n LIMIT 20\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "voted_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "option_label",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "proposal_title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "community_name",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "174c2a9d861710b570536d1350b4e70b13a9290b222eb89ce753a5702de63f0a"
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT approve_community($1, $2)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "approve_community",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "177d2a77cdaaa75e32bae953e520231ce713d5fb5f65f533660c773417be085a"
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, setup_completed, instance_name, platform_mode,\n registration_enabled, registration_mode,\n default_community_visibility, allow_private_communities,\n default_plugin_policy, default_moderation_mode\n FROM instance_settings LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "setup_completed",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "instance_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "platform_mode",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "registration_enabled",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "registration_mode",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "default_community_visibility",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "allow_private_communities",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "default_plugin_policy",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "default_moderation_mode",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "18c0fb05da45a3eea514f660bc4ac4d6aca71442645666a9c08db8f2a564ff6c"
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT gi.id, gi.title, gi.description, gi.proposal_id\n FROM gitlab_issues gi\n JOIN gitlab_connections gc ON gi.connection_id = gc.id\n WHERE gi.id = $1 AND gc.community_id = $2",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "18f2bb2a5454308a0ca13ad574947eaa83e52ab32ba48687f54cdce41b34a141"
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT i.*, c.name as community_name\n FROM invitations i\n LEFT JOIN communities c ON c.id = i.community_id\n WHERE i.code = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "code",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "created_by",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "email",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "max_uses",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "uses_count",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "expires_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"name": "community_name",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "1ad83f237ca18e09dfac8f654b6befac12576bf30f35f3bf626b7ccf46a4fb94"
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE voting_method_plugins SET\n is_active = COALESCE($2, is_active),\n is_default = COALESCE($3, is_default),\n updated_at = NOW()\n WHERE id = $1\n RETURNING id, name, display_name, description, icon, is_active, is_default,\n config_schema, default_config, complexity_level, supports_delegation",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "display_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "icon",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "is_default",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "config_schema",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "default_config",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "complexity_level",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"name": "supports_delegation",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Bool",
|
||||
"Bool"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "1cf0926848f8f1fc1f62337b344f06d86408f94450fe0ed80a44268657e92c06"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE rule_violations \n SET status = 'dismissed', \n reviewed_by = $2, \n reviewed_at = NOW(),\n review_notes = $3,\n resolved_at = NOW(),\n resolution_type = 'dismissed'\n WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "1dcd2fc713e43bb6e785befc420fe94db65d42df35bd8015c550c2f8666664e7"
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, community_id, gitlab_url, project_path, is_active,\n sync_issues, sync_merge_requests, auto_create_proposals, last_synced_at\n FROM gitlab_connections WHERE community_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "gitlab_url",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "project_path",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "sync_issues",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "sync_merge_requests",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "auto_create_proposals",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "last_synced_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "1dedda4e97c32d56c88d29a247f788e5aac67cc9bc59fdd52b40926af3e5a671"
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT * FROM users WHERE username = $1 AND is_active = true",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "username",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "email",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "password_hash",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "display_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "updated_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "is_admin",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "invited_by",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "1efa9b54dff5200841ab35a40e525a8d0da40edca89aa78cd168ae3e854eabc2"
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT author_id, status as \"status: crate::models::ProposalStatus\", title FROM proposals WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "author_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "status: crate::models::ProposalStatus",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "proposal_status",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"draft",
|
||||
"discussion",
|
||||
"voting",
|
||||
"closed",
|
||||
"archived",
|
||||
"calculating"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "1fd0e024053913d7598c5cdb19f407cfa7fef149553e18efc9e5149dd77e7f1c"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM comment_reactions WHERE comment_id = $1 AND user_id = $2 AND reaction_type = $3",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "20414e126202ce893b8e967c585ac6ee9c6cc869033bbe7bbf959d80dcedf82b"
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT plugin_name, is_enabled, config FROM instance_plugins ORDER BY plugin_name",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "plugin_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "is_enabled",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "config",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "21412c1fff5f48e1ca0a5a67c49180efba50cdbc247a467474296f00a4f1f0f2"
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT option_id, SUM(credits) as total_credits, COUNT(DISTINCT voter_id) as voter_count\n FROM quadratic_votes WHERE proposal_id = $1 GROUP BY option_id",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "option_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "total_credits",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "voter_count",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "222ef714ee6f0d715f09643cff679f1c9d5132051dea4cf1f809f06470ed9b44"
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, username, display_name, created_at FROM users WHERE username = $1 AND is_active = true",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "username",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "display_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "2376b5dff203895eb0b78454a323beb8a90d4ea20ca201226d4b228a2b846c4f"
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n ml.id,\n ml.sequence_number,\n ml.community_id,\n ml.actor_user_id,\n u.username AS \"actor_username?\",\n ml.actor_role,\n ml.action_type::text AS \"action_type!\",\n ml.target_type,\n ml.target_id,\n ml.target_snapshot,\n ml.reason,\n ml.rule_reference,\n ml.evidence,\n ml.duration_hours,\n ml.expires_at,\n ml.decision_type,\n ml.vote_proposal_id,\n ml.vote_result,\n ml.previous_hash,\n ml.entry_hash,\n ml.created_at\n FROM moderation_ledger ml\n LEFT JOIN users u ON u.id = ml.actor_user_id\n WHERE ml.id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "sequence_number",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "actor_user_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "actor_username?",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "actor_role",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "action_type!",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "target_type",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "target_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "target_snapshot",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"name": "reason",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"name": "rule_reference",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"name": "evidence",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"name": "duration_hours",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"name": "expires_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"name": "decision_type",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"name": "vote_proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"name": "vote_result",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"name": "previous_hash",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"name": "entry_hash",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "274cc3e62a3bc6659ae9e652d6ac15076f76a5fb7acad44f5e853678cfa2abf3"
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n id, proposal_id, summary_type::text AS \"summary_type!\",\n content, version, is_approved\n FROM deliberation_summaries\n WHERE proposal_id = $1\n ORDER BY summary_type",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "summary_type!",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "content",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "version",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "is_approved",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "27723721585f30329494e2c80e4851b65cd980780e4b756019f73df0f9d28061"
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT \n m.id, m.community_id, m.action_type, m.reason, m.details, m.created_at,\n mod_user.username as moderator_username,\n target_user.username as target_username\n FROM moderation_log m\n LEFT JOIN users mod_user ON m.moderator_id = mod_user.id\n LEFT JOIN users target_user ON m.target_user_id = target_user.id\n WHERE m.community_id = $1\n ORDER BY m.created_at DESC\n LIMIT 50\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "action_type",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "reason",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "details",
|
||||
"type_info": "Jsonb"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "moderator_username",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "target_username",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "28654edaba50887bd4c7f698e538ed9ec70543b1ba6d0ecc5b675a1040148b6a"
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n UPDATE communities\n SET settings = settings || $2::jsonb,\n updated_at = NOW()\n WHERE id = $1 AND is_active = true\n RETURNING settings as \"settings!: serde_json::Value\"\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "settings!: serde_json::Value",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "2a13dcd10626c05bfed533ba131e46f2ba7c132c9e5d58afe30ba11179096bce"
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT p.id, p.title, p.status as \"status: String\", p.created_at, c.slug as community_slug\n FROM proposals p\n JOIN communities c ON p.community_id = c.id\n WHERE c.is_active = true\n ORDER BY p.created_at DESC\n LIMIT 10\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "status: String",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "proposal_status",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"draft",
|
||||
"discussion",
|
||||
"voting",
|
||||
"closed",
|
||||
"archived",
|
||||
"calculating"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "community_slug",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "2a288385b0b4f402803e22171965bedeeb6e40308d09f4a0d4f67258b11f7cd2"
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO community_voting_methods (community_id, voting_method_id, is_enabled, is_default, config)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (community_id, voting_method_id) DO UPDATE SET\n is_enabled = COALESCE($3, community_voting_methods.is_enabled),\n is_default = COALESCE($4, community_voting_methods.is_default),\n config = COALESCE($5, community_voting_methods.config),\n updated_at = NOW()\n RETURNING id, is_enabled, is_default, config",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "is_enabled",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "is_default",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "config",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Bool",
|
||||
"Bool",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "2a7e168921469392cdde35401ab602fdb281f995ad75050af27a4130c311a920"
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT d.id, d.delegator_id, d.delegate_id, u.username as delegator_username,\n d.scope as \"scope: DelegationScope\", d.community_id, d.topic_id, \n d.proposal_id, d.is_active, d.created_at\n FROM delegations d\n JOIN users u ON d.delegator_id = u.id\n WHERE d.delegate_id = $1 AND d.is_active = TRUE\n ORDER BY d.created_at DESC",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "delegator_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "delegate_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "delegator_username",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "scope: DelegationScope",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "delegation_scope",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"global",
|
||||
"community",
|
||||
"topic",
|
||||
"proposal"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "topic_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "2b38c2a93dda00a2ccd0ffe3d2cd83b9cf41d444b6f09b211a57dd6689a9e27e"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT COUNT(DISTINCT voter_id) FROM quadratic_votes WHERE proposal_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "count",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "2c9bb8a5dca54ef476b2908dfad34371f6f34e4a8500f855d01209d32840f683"
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE deliberation_summaries SET\n content = $2, key_points = $3, last_editor_id = $4,\n version = version + 1, edit_count = edit_count + 1,\n is_approved = false, updated_at = NOW()\n WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Jsonb",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "2ca4dcd48f294e84793ad46b960657a7d30cf790418baf4feab371fb45687627"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO public_events (community_id, actor_user_id, plugin_name, event_type, payload)\n VALUES ($1, $2, NULL, 'plugin.policy_updated', $3)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "2cb27026dc438da39c4132e9679d8312ed4909560135b5660c82e06ed61e6436"
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM comments WHERE proposal_id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "2d6f151a2ed11e1a6efecfe1c1cd0242e3e28942cfbae4db71b4d9d709f96522"
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n is_valid,\n total_entries,\n broken_at_sequence,\n expected_hash,\n actual_hash,\n error_message\n FROM verify_ledger_chain($1)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "is_valid",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "total_entries",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "broken_at_sequence",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "expected_hash",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "actual_hash",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "error_message",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "2f7f1f0d1960020529d167240c56abc5bcc6fcd5615890279d2bafcde467fe61"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE proposal_amendments SET\n status = 'accepted',\n reviewed_by = $2,\n reviewed_at = NOW(),\n review_response = $3\n WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "2f80cf2d27e9af290578740b2752a6a0d8c41e62aab523e16cc8cf123e59166f"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id FROM communities WHERE is_active = true",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "31639da003249b784d3603126cb36a1ea592bd819b8f43d9cbd192d7d405c44d"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT EXISTS(\n SELECT 1 FROM user_roles ur\n JOIN roles r ON r.id = ur.role_id\n WHERE ur.user_id = $1 AND r.name IN ('platform_admin', 'platform_moderator')\n ) AS \"exists!\"",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "exists!",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "3167dfbfa487a695ad0953ed59b206fe16833cfe890fdae3fd74d6fe2d11ced5"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE export_jobs SET status = 'expired'\n WHERE status = 'completed' AND download_expires_at < NOW()\n RETURNING id",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "3205e4cb752317923752ee9ace04a93ada7aa8cbfc97a87f9ddf6376dc102146"
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n total_delegations,\n unique_delegators,\n unique_delegates,\n max_chain_depth,\n avg_chain_depth::float8 AS avg_chain_depth,\n top_10_delegate_share::float8 AS top_10_share,\n herfindahl_index::float8 AS hhi,\n effective_delegates\n FROM delegation_analytics\n WHERE community_id = $1\n ORDER BY snapshot_date DESC\n LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "total_delegations",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "unique_delegators",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "unique_delegates",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "max_chain_depth",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "avg_chain_depth",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "top_10_share",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "hhi",
|
||||
"type_info": "Float8"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "effective_delegates",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "3271a11a6d1ad3cc05deda6d3e33bd350180c0b20da49b88c5bc04d5f06eb927"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO federated_proposals \n (federation_id, local_proposal_id, remote_proposal_id, is_origin_local)\n VALUES ($1, $2, $2, true)\n ON CONFLICT DO NOTHING",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "32e740982952a1d3756117f496bcff626f7bcb438a50fa8eef80e013a84e8048"
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE delegations \n SET is_active = FALSE, revoked_at = NOW()\n WHERE delegator_id = $1 \n AND scope = $2::delegation_scope\n AND is_active = TRUE\n AND (community_id = $3 OR ($3 IS NULL AND community_id IS NULL))\n AND (topic_id = $4 OR ($4 IS NULL AND topic_id IS NULL))\n AND (proposal_id = $5 OR ($5 IS NULL AND proposal_id IS NULL))",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
{
|
||||
"Custom": {
|
||||
"name": "delegation_scope",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"global",
|
||||
"community",
|
||||
"topic",
|
||||
"proposal"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3316c52a6ddc9891f4482e6f5df622147b1be87d0723bf709d6d7def94eb1a0c"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO public_events (community_id, actor_user_id, plugin_name, event_type, payload)\n VALUES ($1, $2, NULL, 'plugin.package_uploaded', $3)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "33281e190171ace099ef3209d49ac42b6527824947520336d7d11594ab56b265"
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE rule_violations \n SET status = 'pending_vote', \n reviewed_by = $2, \n reviewed_at = NOW(),\n review_notes = $3,\n escalation_level = $4\n WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "34ac1a3b360d0e99c80d59aad7497794803b0ca05cb498e7715344bc9d512084"
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT user_has_permission($1, 'voting.methods.manage', $2)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "user_has_permission",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "35b2d2fb4f7db1ce97557c01de71c96e64862e3955e1e2d5996581eb4b871f3d"
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO federation_sync_log (federation_id, operation_type, direction, success)\n VALUES ($1, 'local_approval', 'push', true)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3647ec42782a77237f075f172b4d435ac8d6325e60696018386ef1509e499a6d"
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT community_id, rule_id, escalation_level FROM rule_violations WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "rule_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "escalation_level",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "39926d0308364c2a13c987adbc8b364253e9d8d350d69a1e1d3efd1c2e424d81"
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT id, community_id, author_id, title, description,\n status as \"status: _\", voting_method, voting_starts_at, voting_ends_at,\n created_at, updated_at, deliberation_phase as \"deliberation_phase: _\",\n inform_starts_at, inform_ends_at, discuss_starts_at, discuss_ends_at,\n min_read_time_seconds, facilitator_id\n FROM proposals WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "author_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "description",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "status: _",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "proposal_status",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"draft",
|
||||
"discussion",
|
||||
"voting",
|
||||
"closed",
|
||||
"archived",
|
||||
"calculating"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "voting_method",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "voting_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "voting_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"name": "updated_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"name": "deliberation_phase: _",
|
||||
"type_info": {
|
||||
"Custom": {
|
||||
"name": "deliberation_phase",
|
||||
"kind": {
|
||||
"Enum": [
|
||||
"drafting",
|
||||
"informing",
|
||||
"discussing",
|
||||
"voting",
|
||||
"concluded"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"name": "inform_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"name": "inform_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"name": "discuss_starts_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"name": "discuss_ends_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"name": "min_read_time_seconds",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"name": "facilitator_id",
|
||||
"type_info": "Uuid"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "3a395c6e9a23a87fbfa1b3d7a06fbe907b32e3cfb6af327cec1533b7762bd4cd"
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n id, proposal_id, template_id, current_phase_id, \n status, started_at, completed_at\n FROM workflow_instances\n WHERE proposal_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "template_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "current_phase_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "status",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "started_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "completed_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "3a8154bdd76daa157200feea1cce96d67bdb7b7c824088ca625105e96495938f"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT name FROM plugins WHERE is_active = true AND name = ANY($1)",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"TextArray"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "3b034411e6338ddaeae97589f0d0ab13cd674f852ad61b643a2e593d252767f1"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM user_roles WHERE user_id = $1 AND role_id = $2 AND community_id = $3",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3c118e418b94a2d609cde609b53fbbb1a0055fe46397599f7c5eade17b0a5360"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO proposal_options (proposal_id, label, sort_order) VALUES ($1, $2, $3)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3c323153097726bf967b733fc7cb40173a1c64a4b7535a904445e5d02dbe2f0f"
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT \n id, proposal_id, stance::text AS \"stance!\",\n title, content, author_id,\n upvotes, downvotes, quality_score::float8 AS quality_score\n FROM deliberation_arguments\n WHERE proposal_id = $1 AND stance::text = $2 AND NOT is_hidden AND parent_id IS NULL\n ORDER BY quality_score DESC NULLS LAST\n LIMIT $3",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "proposal_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "stance!",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "title",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "content",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "author_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "upvotes",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "downvotes",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "quality_score",
|
||||
"type_info": "Float8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Text",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "3c47d27c939cb21fbcc621825d1ef59d5284c3b6db07e2b11d772fefbcf1650b"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO proposal_resource_reads (resource_id, user_id)\n VALUES ($1, $2)\n ON CONFLICT (resource_id, user_id) DO NOTHING",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3c769ff42e6b6e2df033fa05cf6d8ae1e9fba6320943f65c95613f56a8ea2a13"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT name FROM communities WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "name",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "3d523a0728ea6e9df275520675e3caab1963c61d5d6c3ad468cc51568d4bb5f8"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT platform_mode FROM instance_settings LIMIT 1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "platform_mode",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "3d9153f242fa24637d71a4b4f0a76edee15892248acb6b281ffdbab11a4bff0f"
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO public_events (community_id, actor_user_id, plugin_name, event_type, payload)\n VALUES ($1, $2, $3, 'plugin.settings_updated', $4)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Jsonb"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3e0e0fe2c4e51b68025965560101643e7e035b782b1cd0d110803664c5831fe3"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT COALESCE(\n (SELECT vm.name FROM community_voting_methods cvm \n JOIN voting_method_plugins vm ON vm.id = cvm.voting_method_id\n WHERE cvm.community_id = $1 AND cvm.is_default = true\n LIMIT 1),\n (SELECT name FROM voting_method_plugins WHERE is_default = true LIMIT 1),\n 'approval'\n ) as \"method!\"",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "method!",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "3e7754fe4fe21c7fc50435ad222ed68617f8e8c4f2a21b202ee95d6f76ae0d32"
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE delegate_profiles SET total_delegators = GREATEST(0, total_delegators - 1) WHERE user_id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "403544e4819bc7bcc4ac51c997fb9ec74c3b3fa2c6f2b170ab5b8c8c1d9c65d4"
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE community_voting_methods SET is_default = FALSE WHERE community_id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "41273682b6b15534294e7f90907c7a516cb658e276a50b44f72a2b739ee9e04b"
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO invitations (code, created_by, email, community_id, max_uses, expires_at)\n VALUES ($1, $2, $3, $4, $5, $6)\n RETURNING id, code, created_by, email, community_id, max_uses, uses_count, \n expires_at, is_active, created_at",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "code",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "created_by",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "email",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "community_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "max_uses",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "uses_count",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "expires_at",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "is_active",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Varchar",
|
||||
"Uuid",
|
||||
"Varchar",
|
||||
"Uuid",
|
||||
"Int4",
|
||||
"Timestamptz"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "42e0fab065d541e407129d44f86f1d1d46387494b992c81f7a334e72c42c98ca"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO conflict_history (conflict_id, action_type, action_description, actor_id)\n VALUES ($1, 'conflict_reported', 'Conflict case created', $2)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "43a864f79078c6891186f1d20600983ee080a7033137c0d715880cf20fc7776a"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO comment_reactions (comment_id, user_id, reaction_type) VALUES ($1, $2, $3)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Varchar"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "4619c7159d4bec14be35a308b0a867e3d5b0687a46a456adf6e8dcd1582d3849"
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT plugin_name, is_core, default_enabled FROM default_plugins",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "plugin_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "is_core",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "default_enabled",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "47ea00355af927b41b9c39e55791042049a4bea2d1fab669b4ef6fee3f7a3497"
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO instance_plugins (plugin_name, is_enabled, config, enabled_by, enabled_at)\n VALUES ($1, $2, $3, $4, NOW())\n ON CONFLICT (plugin_name) DO UPDATE SET\n is_enabled = COALESCE($2, instance_plugins.is_enabled),\n config = COALESCE($3, instance_plugins.config),\n updated_at = NOW()\n RETURNING plugin_name, is_enabled, config",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "plugin_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "is_enabled",
|
||||
"type_info": "Bool"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "config",
|
||||
"type_info": "Jsonb"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Varchar",
|
||||
"Bool",
|
||||
"Jsonb",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "47ea0156899876339e02f4769e666c24d5d0fee1f18869d7adcb4aeb007076c8"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT accepting_delegations FROM delegate_profiles WHERE user_id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "accepting_delegations",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "484e7ea64028000ccadd135f9806fd190f860d8ac1cd1c56828fa5be279f57c9"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "INSERT INTO role_permissions (role_id, permission_id, granted)\n SELECT $1, p.id, TRUE FROM permissions p WHERE p.name = $2\n ON CONFLICT (role_id, permission_id) DO UPDATE SET granted = TRUE",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "4a92221917041b95e9a27e511ca70b404313e7dba1faf19bb1eb1347b2208587"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue