Skip to main content

add database table column comments

Project description

django_mysql_comment

auto add comment for mysql table and column

the verbose_name of the django model will be used as comment for mysql table

How to use

pip install addcomments

in settings.py add app

INSTALLED_APPS += [
    'addcomments',
]

then, type command

python manage.py addcolumncomments

finally, the info will be printed, all the models created will be processed

-- FOR test_student.name 
        ALTER TABLE test_student
        MODIFY COLUMN `name` varchar(200) COLLATE utf8mb4_bin NOT NULL  COMMENT '名称'
-- FOR test_student.age 
        ALTER TABLE test_student
        MODIFY COLUMN `age` smallint(6) NOT NULL  COMMENT '年龄'

If any bug

you can fix by yourself or commit your issue here, I will fix

TODO

  • check if postgresql is okay

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

addcomments-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file addcomments-0.0.1.tar.gz.

File metadata

  • Download URL: addcomments-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.9

File hashes

Hashes for addcomments-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aa3edccd0d5dbdbd78342255e55b7dfeb3211ec5bb3344690d902d088c9edbed
MD5 9238a437cb5e00c98def85b23328be85
BLAKE2b-256 75ac24f3709a7ca9305ade6671d66970526daaaa4764cd230bcb1bbc78f08a9f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page