Skip to content

Commit f9549a1

Browse files
committed
README and license updates
1 parent 6369e19 commit f9549a1

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
1-
Django Add Default Value for PostgreSQL
2-
=======================================
1+
# Django Add Default Value for PostgreSQL
32

43
Django Migration Operation that can be used to transfer a field's default value
54
to the database scheme.
65

76
Based on [django-add-default-value](https://github.com/3YOURMIND/django-add-default-value/) by [3YOURMIND](https://github.com/3YOURMIND). This variant drops support for other databases, specifically the Azure ODBC driver which does not support current versions of Django.
87

98

10-
9+
[![CI](https://github.com/Mariana-Tek/django-add-default-value-postgresql/workflows/Python%20package/badge.svg)](https://github.com/Mariana-Tek/django-add-default-value-postgresql/actions?query=workflow%3A%22Python+package%22)
1110
[![PyPi](https://img.shields.io/pypi/v/django-add-default-value-postgresql.svg?branch=master)](https://pypi.python.org/pypi/django-add-default-value-postgresql/)
1211
[![License](https://img.shields.io/github/license/Mariana-Tek/django-add-default-value-postgresql.svg)](./LICENSE)
1312

14-
[![CI](https://github.com/Mariana-Tek/django-add-default-value-postgresql/workflows/Python%20package/badge.svg)](https://github.com/Mariana-Tek/django-add-default-value-postgresql/actions?query=workflow%3A%22Python+package%22)
15-
1613

17-
18-
19-
Dependencies
20-
------------
14+
## Dependencies
2115

2216
* Python 3.6, 3.7, or 3.8
2317
* Django 2.2 or 3.0
2418

2519

20+
## Installation
2621

27-
28-
Installation
29-
------------
3022
`pip install django-add-default-value-postgresql`
3123

3224
You can then use ``AddDefaultValue`` in your migration file to transfer the default
3325
values to your database. Afterwards, it's just the usual ``./manage.py migrate``.
3426

35-
Usage
36-
-----
27+
## Usage
3728

3829
Add this manually to an autogenerated Migration that adds a new field:
3930

@@ -85,9 +76,14 @@ You can test against multiple versions of Django using `tox`. To test across Pyt
8576

8677

8778

88-
License
89-
-------
79+
## License
9080

9181
``django-add-default-value-postgresql`` is released under the Apache 2.0 License.
9282

83+
### Changes from original source
9384

85+
* removed MySQL-related code
86+
* removed MSSQL-related code
87+
* added allow_migrate_model check on database_forwards and database_backwards
88+
* added support for Python 3.7 and 3.8, dropped support for <3.6
89+
* added support for Django 2.2 and 3.0, dropped support for <2.2
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Copyright 2020 Mariana Tek
22
# Copyright 2018 3YOURMIND GmbH
3-
3+
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
7-
7+
#
88
# http://www.apache.org/licenses/LICENSE-2.0
9-
9+
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13+
# or implied. See the License for the specific language governing
14+
# permissions and limitations under the License.
1515

1616
from .add_default_value import * # noqa

django_add_default_value/add_default_value.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Copyright 2020 Mariana Tek
22
# Copyright 2018 3YOURMIND GmbH
3-
3+
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
7-
7+
#
88
# http://www.apache.org/licenses/LICENSE-2.0
9-
9+
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13+
# or implied. See the License for the specific language governing
14+
# permissions and limitations under the License.
15+
1416
import django
1517
from django.db.migrations.operations.base import Operation
1618
from django.db import models

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Copyright 2020 Mariana Tek
22
# Copyright 2018 3YOURMIND GmbH
3-
3+
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
7-
7+
#
88
# http://www.apache.org/licenses/LICENSE-2.0
9-
9+
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13+
# or implied. See the License for the specific language governing
14+
# permissions and limitations under the License.
1515

1616
from setuptools import setup
1717

0 commit comments

Comments
 (0)