remove can_use_coinbase column

This commit is contained in:
Son NK 2020-12-19 16:31:16 +01:00
parent b3d1085e0c
commit 9f9d292754
3 changed files with 39 additions and 17 deletions

View File

@ -94,19 +94,17 @@
$30/year
</button>
{% if current_user.can_use_coinbase %}
<hr>
Payment via
<a href="https://commerce.coinbase.com/?lang=en" target="_blank">
Coinbase Commerce<i class="fe fe-external-link"></i>
</a> <br>
Only the yearly plan is supported. <br>
<hr>
Payment via
<a href="https://commerce.coinbase.com/?lang=en" target="_blank">
Coinbase Commerce<i class="fe fe-external-link"></i>
</a> <br>
Only the yearly plan is supported. <br>
<a class="btn btn-primary" href="{{ url_for('dashboard.coinbase_checkout_route') }}"
target="_blank">
$30/year - Crypto <i class="fe fe-external-link"></i>
</a>
{% endif %}
<a class="btn btn-primary" href="{{ url_for('dashboard.coinbase_checkout_route') }}"
target="_blank">
$30/year - Crypto <i class="fe fe-external-link"></i>
</a>
<hr>
For other payment options, please send us an email at <a href="mailto:hi@simplelogin.io">hi@simplelogin.io</a>

View File

@ -277,11 +277,6 @@ class User(db.Model, ModelMixin, UserMixin):
db.Boolean, default=False, nullable=True
)
# AB test the coinbase integration
can_use_coinbase = db.Column(
db.Boolean, default=False, nullable=False, server_default="0"
)
@classmethod
def create(cls, email, name, password=None, **kwargs):
user: User = super(User, cls).create(email=email, name=name, **kwargs)

View File

@ -0,0 +1,29 @@
"""empty message
Revision ID: 1919f1859215
Revises: 0af2c2e286a7
Create Date: 2020-12-19 16:15:31.608535
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1919f1859215'
down_revision = '0af2c2e286a7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'can_use_coinbase')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('can_use_coinbase', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False))
# ### end Alembic commands ###