question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update source_code field of dag_code table to MEDIUMTEXT

See original GitHub issue

Description

Update source_code field of dag_code table to MEDIUMTEXT

Use case / motivation

Lot of dags exceed the limit of 65K characters limit giving error "Data too long for column 'source_code' at row 1" when enabling webserver to fetch dag_code from db.

Related Issues

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
potiukcommented, Dec 3, 2020

Yup, planning to create a MR for the fix. Might take few days tho as I don’t have the airflow dev setup.

Takes literally few minutes with Breeze: https://github.com/apache/airflow/blob/master/BREEZE.rst

“It’s a Breeze to contribute to Airflow!”

1reaction
ashbcommented, Dec 3, 2020

Again – this is only a problem for MySQL – PostgreSQL’s TEXT type can store 4gb

https://www.postgresql.org/docs/13/datatype-character.html

So your migration only needs to change it for MySQL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

changing fieldtype from TEXT to MEDIUMTEXT
Here is our table structure and sample data: ... This will change that custom field to MEDIUMTEXT, which will allow it to contain...
Read more >
Change field in MySQL from TEXT to LONGTEXT
Simply go to table structure and change field type from TEXT to LONGTEXT . Or you can do it with this sql: ALTER...
Read more >
Problem modifying column type from text to mediumText or ...
Another workaround that I`ve found. change the column to string (VARCHAR) type with the length of 70000 (or bigger than 65536) like this:...
Read more >
Alter table change field to LONGTEXT; - Laracasts
Hello I tried to change Schema::table('table_name', function ($table) ... what I was trying to do is to change a text field (not string)...
Read more >
Release Notes — Airflow Documentation
This table is synchronized with the aforementioned config values every time Airflow starts, and a new field log_template_id is added to every DAG...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found