Comments (9)
Ok thanks, that's quite a job. For anyone that want's a nice quick and easy way to do that, adjust this to your needs and run
#!/bin/bash
# Get a list of all databases
databases=$(mysql -u your_username -p'your_password' -e 'SHOW DATABASES;' | grep -Ev 'Database|information_schema|performance_schema|mysql')
# Loop through each database
for db in $databases; do
# Get a list of all tables in the current database
tables=$(mysql -u your_username -p'your_password' $db -e 'SHOW TABLES;' | grep -v 'Tables_in_')
# Loop through each table
for table in $tables; do
# Execute the ALTER TABLE command, quoting table names with backticks
mysql -u your_username -p'your_password' $db -e "ALTER TABLE \`$table\` ROW_FORMAT=DYNAMIC;"
done
done
from postal.
It seems the initial error was different:
== 20240214132253 AddLockFieldsToWebhookRequests: migrating ===================
-- add_column(:webhook_requests, :locked_by, :string)
-> 0.0105s
-- add_column(:webhook_requests, :locked_at, :datetime, {:precision=>nil})
-> 0.0147s
-- add_index(:webhook_requests, :locked_by)
rake aborted!
StandardError: An error has occurred, all later migrations canceled: (StandardError)
Mysql2::Error: Index column size too large. The maximum column size is 767 bytes
/usr/local/bundle/gems/mysql2-0.5.6/lib/mysql2/client.rb:151:in `_query'
/usr/local/bundle/gems/mysql2-0.5.6/lib/mysql2/client.rb:151:in `block in query'
/usr/local/bundle/gems/mysql2-0.5.6/lib/mysql2/client.rb:150:in `handle_interrupt'
/usr/local/bundle/gems/mysql2-0.5.6/lib/mysql2/client.rb:150:in `query'
/usr/local/bundle/gems/activerecord-7.0.8.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:638:in `block (2 levels) in raw_execute'
/usr/local/bundle/gems/activesupport-7.0.8.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
from postal.
What version of MySQL/MariaDB are you using?
from postal.
MariaDB 10.6.16 - that seems to be the issue. Upgrading right now.
from postal.
Upgraded to 11.2.1:
== 20240223141500 AddTwoFactorRequiredToSessions: migrating ===================
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
from postal.
ALTER TABLE authie_sessions ROW_FORMAT=DYNAMIC;
Fixed the problem
from postal.
Glad you got this sorted.
I have added a note to the upgrade page to note that people do need to be aware of the row format on their tables before upgrading.
https://docs.postalserver.io/getting-started/upgrade-to-v3#database-considerations
from postal.
The docs state "It is important that any pre-existing tables in your database are set up with the DYNAMIC row format." .. does this include all of the postal-server-X databases as well, or just the main postal db?
from postal.
I'd recommend making sure all tables in all databases are set like that to avoid any potential issue in the future.
from postal.
Related Issues (20)
- Messages hang in pending state when database connection fails HOT 3
- when trying to build a mailserver after fresh installation we get an internal server error HOT 2
- https://postalserver.io/config-v2 is a 404 HOT 5
- "Validation failed: Last name can't be blank" when trying to use OIDC HOT 1
- Tiny Typo HOT 2
- 500 error on login - undefined method "login_ip_country", when accessing webserver through reverse proxy HOT 1
- max_message_size in config doesn't seem to have an effect. stuck on 14MB when receiving mails
- No response after clicking the build server button HOT 1
- Unable to access the web interface
- Output: 530 Authentication required
- SMTP-IP Missing Key section
- No complaint FBL handling like SendGrid, Mailgun, Postmark, AWS... HOT 2
- MessageBounced event lacks RFC code for bounce type (Hard or Soft bounce) HOT 3
- dial tcp 127.0.0.1:25: connect: connection refused HOT 1
- Deleting an address endpoint causes not to be able to load routes anymore HOT 1
- email stay in pending postal v3
- Web UI cannot create new server
- Mail forwarded by routers does not use IP pools HOT 1
- POrt 25, ipv4 and ipv6
- Automatic Retention not working? Manual Trigger? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postal.