Пример #1
0
 Column('target_journal', Integer(), nullable=True),
 Column('target_comment', Integer(), nullable=True),
 Column('opened_at', ArrowColumn(), nullable=False),
 Column('urgency', Integer(), nullable=False),
 Column('closerid', Integer(), nullable=True),
 Column('settings',
        CharSettingsColumn({
            'r': 'under-review',
        }, length=20),
        nullable=False,
        server_default=''),
 Column('reportid', Integer(), primary_key=True, nullable=False),
 Column('closed_at', ArrowColumn(), nullable=True),
 Column('closure_reason',
        enum_column(constants.ReportClosureReason,
                    name='report_closure_reason',
                    metadata=metadata),
        nullable=True),
 Column('closure_explanation', Text(), nullable=True),
 default_fkey(['target_user'], ['login.userid'],
              name='report_target_user_fkey'),
 default_fkey(['target_sub'], ['submission.submitid'],
              name='report_target_sub_fkey'),
 default_fkey(['target_char'], ['character.charid'],
              name='report_target_char_fkey'),
 default_fkey(['target_journal'], ['journal.journalid'],
              name='report_target_journal_fkey'),
 default_fkey(['target_comment'], ['comments.commentid'],
              name='report_target_comment_fkey'),
 default_fkey(['closerid'], ['login.userid'], name='report_closerid_fkey'),
 CheckConstraint(
Пример #2
0
 Column('target_user', Integer(), nullable=True),
 Column('target_sub', Integer(), nullable=True),
 Column('target_char', Integer(), nullable=True),
 Column('target_journal', Integer(), nullable=True),
 Column('target_comment', Integer(), nullable=True),
 Column('opened_at', ArrowColumn(), nullable=False),
 Column('urgency', Integer(), nullable=False),
 Column('closerid', Integer(), nullable=True),
 Column('settings', CharSettingsColumn({
     'r': 'under-review',
 }, length=20), nullable=False, server_default=''),
 Column('reportid', Integer(), primary_key=True, nullable=False),
 Column('closed_at', ArrowColumn(), nullable=True),
 Column('closure_reason',
        enum_column(constants.ReportClosureReason,
                    name='report_closure_reason',
                    metadata=metadata),
        nullable=True),
 Column('closure_explanation', Text(), nullable=True),
 default_fkey(['target_user'], ['login.userid'], name='report_target_user_fkey'),
 default_fkey(['target_sub'], ['submission.submitid'], name='report_target_sub_fkey'),
 default_fkey(['target_char'], ['character.charid'], name='report_target_char_fkey'),
 default_fkey(['target_journal'], ['journal.journalid'], name='report_target_journal_fkey'),
 default_fkey(['target_comment'], ['comments.commentid'], name='report_target_comment_fkey'),
 default_fkey(['closerid'], ['login.userid'], name='report_closerid_fkey'),
 CheckConstraint(
     '((target_user IS NOT NULL)::int + (target_sub IS NOT NULL)::int '
     '  + (target_char IS NOT NULL)::int + (target_journal IS NOT NULL)::int '
     '  + (target_comment IS NOT NULL)::int) = 1',
     name='report_target_check'),
 CheckConstraint(