Re: [Koha-devel] Synchronizing a Koha database with kohastructure.sql (Bug 34064)

2023-06-20 Thread David Cook
I thought about using the DBIx::Class files, but that gets messy on a server
with many Koha databases, which all have their own upgrade histories. The
DBIx::Class files also don't include all database information. 

 

I wanted a solution that could analyse and compare for me in a production
environment without needing any cleanup. 

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

From: Marcel de Rooy  
Sent: Tuesday, June 20, 2023 9:08 PM
To: David Cook ; 'koha-devel'

Cc: 'Tomas Cohen Arazi' ; 'Jonathan Druart'

Subject: Re: Synchronizing a Koha database with kohastructure.sql (Bug
34064)

 

We already have misc/devel/update_dbix_class_files.pl.

Copy your Koha/Schema/Result before running. Or run it on a gitified
install.

Compare changes.

  _  

Van: David Cook mailto:dc...@prosentient.com.au>
>
Verzonden: dinsdag 20 juni 2023 06:36
Aan: 'koha-devel' mailto:koha-devel@lists.koha-community.org> >
CC: Marcel de Rooy mailto:m.de.r...@rijksmuseum.nl> >; 'Tomas Cohen Arazi'
mailto:tomasco...@theke.io> >; 'Jonathan Druart'
mailto:jonathan.dru...@bugs.koha-community.org> >
Onderwerp: Synchronizing a Koha database with kohastructure.sql (Bug 34064) 

 

Hi all,

 

I think we've all encountered issues with a Koha database being out of sync
with kohastructure.sql, and it's not a fun experience to have. Today, I ran
into items.paidfor columns that have survived long past a 20.11.00 upgrade.
While looking to resolve that across all my instances, I was thinking how
there could be other quirks as well, so I thought it would be nice to have
an audit script:

 

"Bug 34064 - Compare kohastructure.sql against current database using
database audit script"

 

It's not 100% perfect, but it does a very good job of detecting differences
between a live Koha database and kohastructure.sql, and provides suggestions
on how to remedy the database. 

 

It could be further improved, but I'm quite happy with this first draft. I'd
like to be able to run it using koha-foreach to get a sense of how in-sync
my Koha databases are on a server.

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


Re: [Koha-devel] Synchronizing a Koha database with kohastructure.sql (Bug 34064)

2023-06-20 Thread Marcel de Rooy
We already have misc/devel/update_dbix_class_files.pl.
Copy your Koha/Schema/Result before running. Or run it on a gitified install.
Compare changes.

Van: David Cook 
Verzonden: dinsdag 20 juni 2023 06:36
Aan: 'koha-devel' 
CC: Marcel de Rooy ; 'Tomas Cohen Arazi' 
; 'Jonathan Druart' 

Onderwerp: Synchronizing a Koha database with kohastructure.sql (Bug 34064)


Hi all,



I think we’ve all encountered issues with a Koha database being out of sync 
with kohastructure.sql, and it’s not a fun experience to have. Today, I ran 
into items.paidfor columns that have survived long past a 20.11.00 upgrade. 
While looking to resolve that across all my instances, I was thinking how there 
could be other quirks as well, so I thought it would be nice to have an audit 
script:



“Bug 34064 - Compare kohastructure.sql against current database using database 
audit script”



It’s not 100% perfect, but it does a very good job of detecting differences 
between a live Koha database and kohastructure.sql, and provides suggestions on 
how to remedy the database.



It could be further improved, but I’m quite happy with this first draft. I’d 
like to be able to run it using koha-foreach to get a sense of how in-sync my 
Koha databases are on a server.



David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia



Office: 02 9212 0899

Online: 02 8005 0595


___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


[Koha-devel] Synchronizing a Koha database with kohastructure.sql (Bug 34064)

2023-06-19 Thread David Cook
Hi all,

 

I think we've all encountered issues with a Koha database being out of sync
with kohastructure.sql, and it's not a fun experience to have. Today, I ran
into items.paidfor columns that have survived long past a 20.11.00 upgrade.
While looking to resolve that across all my instances, I was thinking how
there could be other quirks as well, so I thought it would be nice to have
an audit script:

 

"Bug 34064 - Compare kohastructure.sql against current database using
database audit script"

 

It's not 100% perfect, but it does a very good job of detecting differences
between a live Koha database and kohastructure.sql, and provides suggestions
on how to remedy the database. 

 

It could be further improved, but I'm quite happy with this first draft. I'd
like to be able to run it using koha-foreach to get a sense of how in-sync
my Koha databases are on a server.

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/