<filename>alembic/versions/20220201_2057_first_sql_ab7200098679.py
"""first sql

Revision ID: ab7200098679
Revises: 
Create Date: 2022-02-01 20:57:49.770309

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import text
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'ab<PASSWORD>98<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('deal',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('create_user', sa.Integer(), nullable=False),
    sa.Column('update_user', sa.Integer(), nullable=False),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('organization',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('created_user_id', sa.Integer(), nullable=True),
    sa.Column('updated_user_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('address_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('phone_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('email_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('messenger_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('detail', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('key', sa.String(length=8), server_default=sa.text("''"), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('person',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('first_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('last_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('address_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('phone_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('email_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('messenger_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('person_organization',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('person', sa.Integer(), nullable=True),
    sa.Column('org_id', sa.Integer(), nullable=True),
    sa.Column('role_jsonb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('product',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('create_user', sa.Integer(), nullable=False),
    sa.Column('update_user', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=128), server_default=sa.text("''"), nullable=False),
    sa.Column('display', sa.String(length=128), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('ugroup',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('detail', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('ugroup_permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('ugroup_id', sa.Integer(), nullable=True),
    sa.Column('permission_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('status', sa.String(length=1), server_default=sa.text("'A'"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('category', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('user_role', sa.String(length=1), server_default=sa.text("'A'"), nullable=False),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('email', sa.String(length=256), nullable=False),
    sa.Column('first_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('last_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('display', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('nickname', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('avatar', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('api_key', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('api_key_last_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('hash_password', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('password_last_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('last_join_dt', sa.DateTime(timezone=True), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('user_permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('permission_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user_ugroup',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('group_id', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###

    # direct query
    conn = op.get_bind()
    raw_sqls = """
    INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, <PASSWORD>_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:30:40.640', '2022-02-01 21:30:40.640', 'system', '<EMAIL>', 'system', 'system', '', '', '', 'gVG4KDyiYtAB3ISaw2gg', '2022-02-01 21:30:40.640', '', '2022-02-01 21:30:40.640', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:19.764', '2022-02-01 21:31:19.764', 'readonly', '<EMAIL>', 'systemreadonly', 'systemreadonly', '', '', '', 'D8SVUS3pEB0FZnkDYJvj', '2022-02-01 21:31:19.764', '', '2022-02-01 21:31:19.764', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:37.605', '2022-02-01 21:31:37.605', 'api', '<EMAIL>', 'api', 'api', '', '', '', '31zD2DJenEU6LVvOBYUF', '2022-02-01 21:31:37.605', '', '2022-02-01 21:31:37.605', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:57.965', '2022-02-01 21:31:57.965', 
'manager0001', '<EMAIL>', 'first0001', 'last0001', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:31:57.965', 
'$pbkdf2-sha256$29000$uJfSuneO0fp/r5XSeo/Reg$BXDuXrc.Z1TA13iXUSL3VqiH7l6HIVXkmXb5WZL7cR0', '2022-02-01 21:31:57.965', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 
'manager0002', '<EMAIL>', 'first0002', 'last0002', '', '', '', 'l6I7c46i7Z4QjArcnQIJ', '2022-02-01 21:32:26.749',
'$pbkdf2-sha256$29000$du79n9Na6x0jhDCGcI5xTg$Sqdnagq/FHcffCnbNiGXzy7GPSWH1IIbQekP7zqjbEQ', '2022-02-01 21:32:26.749', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 
'manager0003', '<EMAIL>', 'first0003', 'last0003', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:32:26.749', 
'$pbkdf2-sha256$29000$aw0hpFSKMab03ltrjZHyPg$uWem8cugYaOT8NMN3N9zswbFnU3W18j7HXQDQLP4Q5k', '2022-02-01 21:32:26.749', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 'manager0004', '<EMAIL>', 'first0004', 'last0004', '', '', '', 'dhyrgHsjNM0Tp4Ga5lYX''', '2022-02-01 21:32:26.749', 
'$pbkdf2-sha256$29000$hbB27v3fe.99z3nvPadUig$LXFijgsjDSVp34wHIh7hl.HH9Q9a0juEx69F5MaW7Z8', '2022-02-01 21:32:26.749', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:46:18.195', '2022-02-01 21:46:18.195', 'tester0005', '<EMAIL>', 'first0005', 'last0005', '', '', '', 'vvEXuNbwOgOiXsEXobaw', '2022-02-01 21:46:18.195', 
'$pbkdf2-sha256$29000$NsY4ZyzFmPP.X.tdi3GO0Q$CthIpixX4ebBYXveB9b7.jiGHe.PS4t0yK3djHWlzRw', '2022-02-01 21:46:18.195', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:04.841', '2022-02-01 21:47:04.841', 'tester0006', '<EMAIL>', 'first0006', 'last0006', '', '', '', 'EedACppzk4BUZTKQL9iy', '2022-02-01 21:47:04.841', 
'$pbkdf2-sha256$29000$NobQutcaA2Cs1Vqrtdba.w$aCVIUGWvk0M7Qvi4bhMSvdAIteKZ6h29cAd/5f.8XTA', '2022-02-01 21:47:04.841', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:49.618', '2022-02-01 21:47:49.618', 'tester0007', 'tester00<EMAIL>', 'first0007', 'last0007', '', '', '', '6rKZznCcLuLNBFbNrYzS', '2022-02-01 21:47:49.618', 
'$pbkdf2-sha256$29000$fO99Tyml9L733rtXqpWy1g$NCUcOprOszJ3m9G6.s8POFekyqhV1Q/7M4X5c6oFOeg', '2022-02-01 21:47:49.618', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:48:07.409', '2022-02-01 21:48:07.409', 'tester0008', '<EMAIL>', 'first0008', 'last0008', '', '', '', 'qWSAZYSTROU4QgMkZyb1', '2022-02-01 21:48:07.409', 
'$pbkdf2-sha256$29000$QKi19v4f4zxHKCWkdE4pJQ$0t2sJG242hqHFutWDOM.MgNVZZuZC/mPai1CjIWmrZU', '2022-02-01 21:48:07.409', NULL);
"""
    for raw_sql in raw_sqls.split(";"):
        sql = raw_sql.strip()
        if sql == "" :
            continue
        conn.execute(text(sql))


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('user_ugroup')
    op.drop_table('user_permission')
    op.drop_table('user')
    op.drop_table('ugroup_permission')
    op.drop_table('ugroup')
    op.drop_table('product')
    op.drop_table('person_organization')
    op.drop_table('person')
    op.drop_table('permission')
    op.drop_table('organization')
    op.drop_table('deal')
    # ### end Alembic commands ###

    # direct query
    # conn = op.get_bind()   # noqa
    # raw_sql = """   """"
    # conn.execute(raw_sql)

<filename>alembic/versions/20220201_2057_first_sql_ab7200098679.py
"""first sql

Revision ID: ab7200098679
Revises: 
Create Date: 2022-02-01 20:57:49.770309

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import text
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'ab<PASSWORD>98<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('deal',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('create_user', sa.Integer(), nullable=False),
    sa.Column('update_user', sa.Integer(), nullable=False),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('organization',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('created_user_id', sa.Integer(), nullable=True),
    sa.Column('updated_user_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('address_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('phone_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('email_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('messenger_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('detail', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('key', sa.String(length=8), server_default=sa.text("''"), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('person',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('first_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('last_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('address_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('phone_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('email_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('messenger_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('person_organization',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('person', sa.Integer(), nullable=True),
    sa.Column('org_id', sa.Integer(), nullable=True),
    sa.Column('role_jsonb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('product',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('create_user', sa.Integer(), nullable=False),
    sa.Column('update_user', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=128), server_default=sa.text("''"), nullable=False),
    sa.Column('display', sa.String(length=128), server_default=sa.text("''"), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('ugroup',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('detail', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('status', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('ugroup_permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('ugroup_id', sa.Integer(), nullable=True),
    sa.Column('permission_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('ref_id1', sa.Integer(), nullable=True),
    sa.Column('ref_id0', sa.Integer(), nullable=True),
    sa.Column('status', sa.String(length=1), server_default=sa.text("'A'"), nullable=False),
    sa.Column('testmode', sa.String(length=1), server_default=sa.text("''"), nullable=False),
    sa.Column('category', sa.Integer(), nullable=True),
    sa.Column('data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('category_data_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'{}'::jsonb"), nullable=True),
    sa.Column('category_tags_jb', postgresql.JSONB(astext_type=sa.Text()), server_default=sa.text("'[]'::jsonb"), nullable=True),
    sa.Column('user_role', sa.String(length=1), server_default=sa.text("'A'"), nullable=False),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('email', sa.String(length=256), nullable=False),
    sa.Column('first_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('last_name', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('display', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('nickname', sa.String(length=64), server_default=sa.text("''"), nullable=False),
    sa.Column('avatar', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('api_key', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('api_key_last_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('hash_password', sa.String(length=256), server_default=sa.text("''"), nullable=False),
    sa.Column('password_last_at', sa.DateTime(timezone=True), nullable=False),
    sa.Column('last_join_dt', sa.DateTime(timezone=True), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('user_permission',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('permission_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user_ugroup',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('group_id', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###

    # direct query
    conn = op.get_bind()
    raw_sqls = """
    INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, <PASSWORD>_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:30:40.640', '2022-02-01 21:30:40.640', 'system', '<EMAIL>', 'system', 'system', '', '', '', 'gVG4KDyiYtAB3ISaw2gg', '2022-02-01 21:30:40.640', '', '2022-02-01 21:30:40.640', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:19.764', '2022-02-01 21:31:19.764', 'readonly', '<EMAIL>', 'systemreadonly', 'systemreadonly', '', '', '', 'D8SVUS3pEB0FZnkDYJvj', '2022-02-01 21:31:19.764', '', '2022-02-01 21:31:19.764', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:37.605', '2022-02-01 21:31:37.605', 'api', '<EMAIL>', 'api', 'api', '', '', '', '31zD2DJenEU6LVvOBYUF', '2022-02-01 21:31:37.605', '', '2022-02-01 21:31:37.605', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:57.965', '2022-02-01 21:31:57.965', 
'manager0001', '<EMAIL>', 'first0001', 'last0001', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:31:57.965', 
'$pbkdf2-sha256$29000$uJfSuneO0fp/r5XSeo/Reg$BXDuXrc.Z1TA13iXUSL3VqiH7l6HIVXkmXb5WZL7cR0', '2022-02-01 21:31:57.965', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 
'manager0002', '<EMAIL>', 'first0002', 'last0002', '', '', '', 'l6I7c46i7Z4QjArcnQIJ', '2022-02-01 21:32:26.749',
'$pbkdf2-sha256$29000$du79n9Na6x0jhDCGcI5xTg$Sqdnagq/FHcffCnbNiGXzy7GPSWH1IIbQekP7zqjbEQ', '2022-02-01 21:32:26.749', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 
'manager0003', '<EMAIL>', 'first0003', 'last0003', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:32:26.749', 
'$pbkdf2-sha256$29000$aw0hpFSKMab03ltrjZHyPg$uWem8cugYaOT8NMN3N9zswbFnU3W18j7HXQDQLP4Q5k', '2022-02-01 21:32:26.749', NULL);

INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 'manager0004', '<EMAIL>', 'first0004', 'last0004', '', '', '', 'dhyrgHsjNM0Tp4Ga5lYX''', '2022-02-01 21:32:26.749', 
'$pbkdf2-sha256$29000$hbB27v3fe.99z3nvPadUig$LXFijgsjDSVp34wHIh7hl.HH9Q9a0juEx69F5MaW7Z8', '2022-02-01 21:32:26.749', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:46:18.195', '2022-02-01 21:46:18.195', 'tester0005', '<EMAIL>', 'first0005', 'last0005', '', '', '', 'vvEXuNbwOgOiXsEXobaw', '2022-02-01 21:46:18.195', 
'$pbkdf2-sha256$29000$NsY4ZyzFmPP.X.tdi3GO0Q$CthIpixX4ebBYXveB9b7.jiGHe.PS4t0yK3djHWlzRw', '2022-02-01 21:46:18.195', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:04.841', '2022-02-01 21:47:04.841', 'tester0006', '<EMAIL>', 'first0006', 'last0006', '', '', '', 'EedACppzk4BUZTKQL9iy', '2022-02-01 21:47:04.841', 
'$pbkdf2-sha256$29000$NobQutcaA2Cs1Vqrtdba.w$aCVIUGWvk0M7Qvi4bhMSvdAIteKZ6h29cAd/5f.8XTA', '2022-02-01 21:47:04.841', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:49.618', '2022-02-01 21:47:49.618', 'tester0007', 'tester00<EMAIL>', 'first0007', 'last0007', '', '', '', '6rKZznCcLuLNBFbNrYzS', '2022-02-01 21:47:49.618', 
'$pbkdf2-sha256$29000$fO99Tyml9L733rtXqpWy1g$NCUcOprOszJ3m9G6.s8POFekyqhV1Q/7M4X5c6oFOeg', '2022-02-01 21:47:49.618', NULL);


INSERT INTO public."user"
(ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt)
VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:48:07.409', '2022-02-01 21:48:07.409', 'tester0008', '<EMAIL>', 'first0008', 'last0008', '', '', '', 'qWSAZYSTROU4QgMkZyb1', '2022-02-01 21:48:07.409', 
'$pbkdf2-sha256$29000$QKi19v4f4zxHKCWkdE4pJQ$0t2sJG242hqHFutWDOM.MgNVZZuZC/mPai1CjIWmrZU', '2022-02-01 21:48:07.409', NULL);
"""
    for raw_sql in raw_sqls.split(";"):
        sql = raw_sql.strip()
        if sql == "" :
            continue
        conn.execute(text(sql))


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('user_ugroup')
    op.drop_table('user_permission')
    op.drop_table('user')
    op.drop_table('ugroup_permission')
    op.drop_table('ugroup')
    op.drop_table('product')
    op.drop_table('person_organization')
    op.drop_table('person')
    op.drop_table('permission')
    op.drop_table('organization')
    op.drop_table('deal')
    # ### end Alembic commands ###

    # direct query
    # conn = op.get_bind()   # noqa
    # raw_sql = """   """"
    # conn.execute(raw_sql)

first sql  Revision ID: ab7200098679 Revises:  Create Date: 2022-02-01 20:57:49.770309 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # direct query INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, <PASSWORD>_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:30:40.640', '2022-02-01 21:30:40.640', 'system', '<EMAIL>', 'system', 'system', '', '', '', 'gVG4KDyiYtAB3ISaw2gg', '2022-02-01 21:30:40.640', '', '2022-02-01 21:30:40.640', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:19.764', '2022-02-01 21:31:19.764', 'readonly', '<EMAIL>', 'systemreadonly', 'systemreadonly', '', '', '', 'D8SVUS3pEB0FZnkDYJvj', '2022-02-01 21:31:19.764', '', '2022-02-01 21:31:19.764', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'S', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:37.605', '2022-02-01 21:31:37.605', 'api', '<EMAIL>', 'api', 'api', '', '', '', '31zD2DJenEU6LVvOBYUF', '2022-02-01 21:31:37.605', '', '2022-02-01 21:31:37.605', NULL);  INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:31:57.965', '2022-02-01 21:31:57.965',  'manager0001', '<EMAIL>', 'first0001', 'last0001', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:31:57.965',  '$pbkdf2-sha256$29000$uJfSuneO0fp/r5XSeo/Reg$BXDuXrc.Z1TA13iXUSL3VqiH7l6HIVXkmXb5WZL7cR0', '2022-02-01 21:31:57.965', NULL);  INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749',  'manager0002', '<EMAIL>', 'first0002', 'last0002', '', '', '', 'l6I7c46i7Z4QjArcnQIJ', '2022-02-01 21:32:26.749', '$pbkdf2-sha256$29000$du79n9Na6x0jhDCGcI5xTg$Sqdnagq/FHcffCnbNiGXzy7GPSWH1IIbQekP7zqjbEQ', '2022-02-01 21:32:26.749', NULL);  INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749',  'manager0003', '<EMAIL>', 'first0003', 'last0003', '', '', '', 'esGXbEThXiNF3XKXN6Xq', '2022-02-01 21:32:26.749',  '$pbkdf2-sha256$29000$aw0hpFSKMab03ltrjZHyPg$uWem8cugYaOT8NMN3N9zswbFnU3W18j7HXQDQLP4Q5k', '2022-02-01 21:32:26.749', NULL);  INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'M', '2022-02-01 21:32:26.749', '2022-02-01 21:32:26.749', 'manager0004', '<EMAIL>', 'first0004', 'last0004', '', '', '', 'dhyrgHsjNM0Tp4Ga5lYX''', '2022-02-01 21:32:26.749',  '$pbkdf2-sha256$29000$hbB27v3fe.99z3nvPadUig$LXFijgsjDSVp34wHIh7hl.HH9Q9a0juEx69F5MaW7Z8', '2022-02-01 21:32:26.749', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:46:18.195', '2022-02-01 21:46:18.195', 'tester0005', '<EMAIL>', 'first0005', 'last0005', '', '', '', 'vvEXuNbwOgOiXsEXobaw', '2022-02-01 21:46:18.195',  '$pbkdf2-sha256$29000$NsY4ZyzFmPP.X.tdi3GO0Q$CthIpixX4ebBYXveB9b7.jiGHe.PS4t0yK3djHWlzRw', '2022-02-01 21:46:18.195', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:04.841', '2022-02-01 21:47:04.841', 'tester0006', '<EMAIL>', 'first0006', 'last0006', '', '', '', 'EedACppzk4BUZTKQL9iy', '2022-02-01 21:47:04.841',  '$pbkdf2-sha256$29000$NobQutcaA2Cs1Vqrtdba.w$aCVIUGWvk0M7Qvi4bhMSvdAIteKZ6h29cAd/5f.8XTA', '2022-02-01 21:47:04.841', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:47:49.618', '2022-02-01 21:47:49.618', 'tester0007', 'tester00<EMAIL>', 'first0007', 'last0007', '', '', '', '6rKZznCcLuLNBFbNrYzS', '2022-02-01 21:47:49.618',  '$pbkdf2-sha256$29000$fO99Tyml9L733rtXqpWy1g$NCUcOprOszJ3m9G6.s8POFekyqhV1Q/7M4X5c6oFOeg', '2022-02-01 21:47:49.618', NULL);   INSERT INTO public."user" (ref_id1, ref_id0, status, testmode, category, data_jb, tags_jb, category_data_jb, category_tags_jb, user_role, created_at, updated_at, "name", email, first_name, last_name, display, nickname, avatar, api_key, api_key_last_at, hash_password, password_last_at, last_join_dt) VALUES(NULL, NULL, 'A', '', NULL, '{}'::jsonb, '[]'::jsonb, '{}'::jsonb, '[]'::jsonb, 'N', '2022-02-01 21:48:07.409', '2022-02-01 21:48:07.409', 'tester0008', '<EMAIL>', 'first0008', 'last0008', '', '', '', 'qWSAZYSTROU4QgMkZyb1', '2022-02-01 21:48:07.409',  '$pbkdf2-sha256$29000$QKi19v4f4zxHKCWkdE4pJQ$0t2sJG242hqHFutWDOM.MgNVZZuZC/mPai1CjIWmrZU', '2022-02-01 21:48:07.409', NULL); # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # direct query # conn = op.get_bind()   # noqa # raw_sql = """   """" # conn.execute(raw_sql)