idno / known

A social publishing platform.
https://withknown.com/opensource
Other
1.04k stars 194 forks source link

Regular new releases #3146

Open AmritasyaPutra opened 1 year ago

AmritasyaPutra commented 1 year ago

I used known to migrate my old blog. I used a shared hosting and have 7 other web applications. I could upgrade everything to PHP 8.1 from PHP 7.4 with very little effort but with "Known" I am having a tough time because I need to update the dependency / vendor. This must be a common headache with many users. Having regular release not only solves this problem but also sends a positive message to the users about regular activity. This also means publishing well defined improvements and fixes done in a release. If there are no such defined steps in over 3 years it looks poor.

thierrymarianne commented 1 year ago

Hey @AmritasyaPutra, I think you should definitely switch to using the dev branch. Its clearly not the best to recommend (with regard to the level of stability and confidence we could have for each new major release of any project). However, this project dev branch is very stable.

I've been running known in production from this branch for quite a while without any trouble and it appears to be fully compatible with PHP 8.1 as far as i can tell with regard to the core plugins. Please don't trust solely my word on this, I think other users like you and me might have experienced the same (or not ... in which case, I'd like to hear from them).

AmritasyaPutra commented 1 year ago

Thanks. I went to the dev branch and that works fine on PHP 8.1. I moved from 1.2.2+2020061101 to 1.3.1+2020120201.

schema label has the value 2020120301 in versions table. Looking at function checkAndUpgradeSchema() this seems to be the latest schema. Now I am getting the following errors, what should I do: error - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'siteid' in 'field list'

I don't have 'siteid' in my config, entities and reader tables and my site and site_metadata tables are empty. The site is 'appearing' alright, here it is : https://k.ekvastra.in/ doesn't this mean something was missed during schema upgrade?

AmritasyaPutra commented 1 year ago

I ran the alter table statements in 2020111301.sql manually. That takes care of the missing columns. What should I run next before I can run update statements from 2020120201.sql?

Inspecting the logs I see that only the following schema update was run, unfortunately I do not have the backup of the table before this ran to debug further: [27-Jan-2023 13:48:21 UTC] Applying schema updates from /home/ekvastra/k.ekvastra.in/warmup/schemas/mysql/2020120301.sql

thierrymarianne commented 1 year ago

Hey!

The mysql migration directory contains:

2014100801.sql
2015061501.sql
2016013101.sql
2016102601.sql
2016110301.sql
2017032001.sql
2019060501.sql
2019121401.sql
2020042101.sql
2020111301.sql # <- you ran that one manually
2020120201.sql
2020120301.sql # <- according to your logs, that migration was applied

Since only 2020120201.sql might be missing, you could re-run the following queries manually:

UPDATE `entities` set `siteid` = ( SELECT `_id` FROM `site` limit 1 );
UPDATE `reader` set `siteid` = ( SELECT `_id` FROM `site` limit 1 );
UPDATE `config` set `siteid` = ( SELECT `_id` FROM `site` limit 1 );

Those update queries won't hurt since they're supposed to populate columns added by 2020111301.sql

Please make a backup of your database before running migrations. Fortunately, it seems there was no harm done this time 🍀.

AmritasyaPutra commented 1 year ago

Thanks. I agree... but since my site and site_metadata tables are empty the above update commands won't do anything. There must have been some code at some point that seeds the siteid in the site table it if it is empty. This appears to be a tolerable scenario... not having any siteid, because my site is working fine.

benwerd commented 1 year ago

We released Known 1.5 yesterday. From here on out you can expect incremental new releases at least every two months.

thierrymarianne commented 1 year ago

Amazing! Congratulations on the release and thank you for making it happen!

benwerd commented 2 months ago

Updating to say that, well, this didn't happen.

I think one of the reasons is that the codebase has become overloaded and crufty. My suspicion is that we need to reduce dependencies, delete a lot of code, and return to a leaner architecture.

Thinking about how this can be done well. I still depend on Known and I know others do too.