Skip to content

Commit

Permalink
README and license updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarbaugh committed Mar 5, 2020
1 parent 6369e19 commit f9549a1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,30 @@
Django Add Default Value for PostgreSQL
=======================================
# Django Add Default Value for PostgreSQL

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

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.



[![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)
[![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/)
[![License](https://img.shields.io/github/license/Mariana-Tek/django-add-default-value-postgresql.svg)](./LICENSE)

[![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)




Dependencies
------------
## Dependencies

* Python 3.6, 3.7, or 3.8
* Django 2.2 or 3.0


## Installation


Installation
------------
`pip install django-add-default-value-postgresql`

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

Usage
-----
## Usage

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

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



License
-------
## License

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

### Changes from original source

* removed MySQL-related code
* removed MSSQL-related code
* added allow_migrate_model check on database_forwards and database_backwards
* added support for Python 3.7 and 3.8, dropped support for <3.6
* added support for Django 2.2 and 3.0, dropped support for <2.2
12 changes: 6 additions & 6 deletions django_add_default_value/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Copyright 2020 Mariana Tek
# Copyright 2018 3YOURMIND GmbH

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#
# http://www.apache.org/licenses/LICENSE-2.0

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.

from .add_default_value import * # noqa
12 changes: 7 additions & 5 deletions django_add_default_value/add_default_value.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Copyright 2020 Mariana Tek
# Copyright 2018 3YOURMIND GmbH

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#
# http://www.apache.org/licenses/LICENSE-2.0

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.

import django
from django.db.migrations.operations.base import Operation
from django.db import models
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Copyright 2020 Mariana Tek
# Copyright 2018 3YOURMIND GmbH

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#
# http://www.apache.org/licenses/LICENSE-2.0

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.

from setuptools import setup

Expand Down

0 comments on commit f9549a1

Please sign in to comment.