Commit Graph

39 Commits

Author SHA1 Message Date
Scott McGrath 82d5af2dfb
fix(legacy): migrations from airtime 2.5.1 (#3123)
### Description

This fixes various problems in legacy migrations that were preventing a
successful database migration from Airtime 2.5.1. Previously, following
[the
procedure](https://libretime.org/docs/admin-manual/install/migrate-from-airtime/)
using the migrations provided in the Libretime 4.2.0 installer, without
the fixes in this PR, would either fail completely, or cause all of the
imported data to be completely deleted.


_migrations.py
If schema_version is not found in the table cc_prefs, it then checks for
system_version to have a value of '2.5.1' (in case this is an airtime
2.5.1 migration which will not have any schema_version in cc_pref). If
found, it prevents loading of the schema file, which is critical to
preserving the imported Airtime data.

0006_2_5_5
Removed a redundant addition of the image_path and description columns
to cc_show (done in earlier migration 003_2_5_2)

0015_2_5_17
Fixed a syntax error with adding the artwork column to cc_files

0023_3_0_0_alpha_9_1
Removed a redundant addition of the artwork column to cc_files (done in
earlier migration 0015_2_5_7)

### Documentation Changes

The [airtime migration
documentation](https://libretime.org/docs/admin-manual/install/migrate-from-airtime/)
already suggests a procedure to be followed, it just didn't work because
of problems within these migrations. The procedure as documented should
now work for those coming from Airtime 2.5.1.

### Testing Notes

**What I did:**

I attempted to migrate an actual airtime 2.5.1 database from a
production system containing a large amount of shows, tracks, and users.
I observed that the migration completed without errors, and that the
expected system state was achieved within Libretime. Specifically, the
calendar, library, authentication, and other aspects are populated with
the data that was present in the migrated Airtime database, and
Libretime is able to function using this data.

**How you can replicate my testing:**

Install Libretime 4.2.0. Restore a sample postrgresql database backup
from an Airtime 2.5.1 server. Apply the database migration. Restart the
services. Login and view the library, calender, etc.

### **Links**

Closes: #3121  
May also be related to, or even close (as a duplicate): #2563
2024-12-21 10:09:19 +00:00
Thomas Göttgens 7992a9be2d
fix: intro/outro playlist unset was impossible (#3101)
this reinstates the boolean fields in the database from the original PR
to work around a foreign key contraint. THE UI remains unchanged
2024-10-21 18:34:39 +01:00
Thomas Göttgens 299be3c142
feat: use custom intro/outro playlists per show (#2941)
### Description

Having a global intro and outro playlist in settings is not very
flexible for special programming. This adds an override intro/outro
playlist per show. If it is not set, the global one is used. also it's
ignored if there's no autloading at all.

**I have updated the documentation to reflect these changes**:

Yes

### Testing Notes

**What I did:**
Schedule 2 shows, one without defining custom lists, one with defining
custom lists. one hour before the show starts it should be populated
correctly. If you define a global list it shojuld be replaced with the
per-show list.

---------

Co-authored-by: Thomas Göttgens <tgoettgens@mail.com>
2024-10-14 21:07:41 +01:00
Jonas L 001466f8fd
feat(legacy): move session store to database (#2523) 2023-05-30 22:25:50 +02:00
jo 87de25052a cuepoints analyzer disabled by default 2023-02-15 10:13:32 +02:00
jo f5e46c6f3d feat: configure cue points analysis per track type 2023-02-15 10:13:32 +02:00
jo f8f6fda794 chore: raise from specific exceptions 2023-02-03 07:36:58 +02:00
Jonas L cff98f2d23
feat(legacy): remove db allowed_cors_origins preference (#2095)
- Remove after deprecation in eb8e7b3415
2022-10-11 13:38:31 +02:00
jo e54c8d22e1 feat: delete cc_pref stream preferences rows
- Delete the previously deprecated cc_pref stream preferences rows.
2022-10-11 11:32:51 +02:00
jo 8a6b5907be feat: drop cc_stream_setting table
- Remove the previously deprecated cc_stream_setting table.
2022-10-11 11:32:51 +02:00
jo 3d124eba7e fix(api): allow single digit version for legacy schema 2022-10-11 11:32:51 +02:00
jo 10a60d3673 chore: bump legacy schema version 2022-09-15 17:11:01 +02:00
jo 882f8e04c6 chore(api): rename legacy migration files 2022-09-15 17:11:01 +02:00
Jonas L 9b3207b8a4
feat: move timezone preference to config file (#2096)
BREAKING CHANGE: The timezone preference moved to the configuration
file.
2022-09-14 12:48:08 +02:00
jo 5bf62dd9cb feat(legacy): read stream config from file
- We don't delete the stream preferences from the database to prevent data loss. This will be handled in a future release.
2022-09-06 13:21:54 +02:00
jo 65d3552fc7 feat: remove cc_stream_setting models
- We don't drop the cc_stream_setting table from the database to prevent data loss. This will be handled in a future release.
2022-09-06 13:21:54 +02:00
jo 406d42323a feat: move stream stats status to pref table 2022-08-07 08:50:06 +02:00
jo 2b533d4724 feat: move stream liquisoap status to pref table 2022-08-07 08:50:06 +02:00
Jonas L 6c59ff588b
feat: move off_air_meta stream setting to pref table (#2023) 2022-08-06 19:18:40 +02:00
jo a8cb62586e feat: remove unused cc_country table 2022-07-12 11:33:22 +02:00
jo de21e3175a fix: use track_type_id in smartblock criteria
Missing migration step from db976881f0

Fixes #1957
2022-07-12 11:32:26 +02:00
jo f39c079296 feat: set default locale to en_US 2022-07-08 13:11:32 +02:00
jo 3442376b08 chore: clean default data.sql 2022-07-08 13:11:32 +02:00
Jonas L d323657047
fix: prevent data loose on track_types_id migration (#1949) 2022-07-07 23:35:27 +02:00
jo db976881f0 fix: use constrained foreign key for files track_type 2022-07-07 21:07:41 +02:00
Jonas L 703a8e5856
chore: remove cloud storage remainings (#1934) 2022-07-04 22:09:14 +02:00
jo 86b7a34263 chore(api): fix linting errors 2022-06-26 16:13:47 +02:00
Jonas L 9c042c881a
feat: remove unused cc_perms table (#1909) 2022-06-22 16:32:39 +02:00
Jonas L a7c45fb0e1
fix(api): cascade when dropping table (#1908)
This is supposed to work without it, but this is to be safe.
2022-06-22 16:08:05 +02:00
Jonas L 4837a1885d
feat: remove unused cc_sess table (#1907) 2022-06-22 15:15:31 +02:00
jo 7ff59e272c chore(api): disable some linting rule 2022-06-22 13:37:17 +02:00
jo 71cfab79ef feat: rename default stream mount point to main
This will not change the default mount point if you are upgrading.

BREAKING: The default stream mount point changed from `airtime_128` to `main`. Be sure to updates your clients accordingly.
2022-06-18 12:08:29 +02:00
jo 3bca92413f fix: drop unused sequences
Drop old campcaster sequences that aren't used anymore.
2022-06-08 23:23:08 +02:00
jo 28b9343c77 fix(legacy): remove not null contraint when using default
This fixes the inital schema creation to match as if the old migrations
were always run.

The third_party_track_references.file_id field should not have a not
null constraint while have a default value to 0.
2022-06-08 23:23:08 +02:00
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00
jo 980f1acd0c fix: correct cc_file.artwork column size 2022-06-08 23:23:08 +02:00
jo 6889e11a91 fix: don't add track types only on migration 2022-06-08 23:23:08 +02:00
jo 4be8bde14e feat: drop cc_locale table 2022-06-08 23:23:08 +02:00
jo 0e4bc4cacd feat: replace php migration with django migration
- keep latest legacy version in initial migration file
- move propel schema to api legacy app
- remove legacy upgrade tool
2022-06-08 23:23:08 +02:00