Title: sqlautocode generates foreign keys but not relation information · Issue #31 · unalloc/sqlautocode · GitHub
Open Graph Title: sqlautocode generates foreign keys but not relation information · Issue #31 · unalloc/sqlautocode
X Title: sqlautocode generates foreign keys but not relation information · Issue #31 · unalloc/sqlautocode
Description: What steps will reproduce the problem? 1. With attached sql create a MySQL db 2. run sqlautocode -d mysql://localhost/dbname -o model.py What is the expected output? What do you see instead? Expected: generated relation definitions Inste...
Open Graph Description: What steps will reproduce the problem? 1. With attached sql create a MySQL db 2. run sqlautocode -d mysql://localhost/dbname -o model.py What is the expected output? What do you see instead? Expect...
X Description: What steps will reproduce the problem? 1. With attached sql create a MySQL db 2. run sqlautocode -d mysql://localhost/dbname -o model.py What is the expected output? What do you see instead? Expect...
Opengraph URL: https://github.com/unalloc/sqlautocode/issues/31
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlautocode generates foreign keys but not relation information","articleBody":"```\nWhat steps will reproduce the problem?\n1. With attached sql create a MySQL db\n2. run sqlautocode -d mysql://localhost/dbname -o model.py\n\nWhat is the expected output? What do you see instead?\nExpected: generated relation definitions \nInstead got:\nsamples = Table(u'samples', metadata,\n Column(u'id', SMALLINT(), primary_key=True, nullable=False),\n Column(u'name', VARCHAR(length=45, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False), nullable=False),\n Column(u'experiment_id', SMALLINT(), ForeignKey('experiments.id'), nullable=False),\n Column(u'timepoint_id', SMALLINT(), ForeignKey('timepoints.id'), nullable=False),\n)\n\nsamples2conditions = Table(u'samples2conditions', metadata,\n Column(u'condition_id', SMALLINT(), ForeignKey('conditions.id'), primary_key=True, nullable=False),\n Column(u'sample_id', SMALLINT(), ForeignKey('samples.id'), primary_key=True, nullable=False),\n)\n\nclass Condition(DeclarativeBase):\n __tablename__ = 'conditions'\n\n #column definitions\n experiment_id = Column(u'experiment_id', SMALLINT(), ForeignKey('experiments.id'), nullable=False)\n id = Column(u'id', SMALLINT(), primary_key=True, nullable=False)\n name = Column(u'name', VARCHAR(length=45, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False), nullable=False)\n\n #relation definitions\n\n\nclass Experiment(DeclarativeBase):\n __tablename__ = 'experiments'\n\n #column definitions\n id = Column(u'id', SMALLINT(), primary_key=True, nullable=False)\n name = Column(u'name', VARCHAR(length=45, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False), nullable=False)\n\n #relation definitions\n\n\nclass Sample(DeclarativeBase):\n __table__ = samples\n\n\n #relation definitions\n\n\nclass Timepoint(DeclarativeBase):\n __tablename__ = 'timepoints'\n\n #column definitions\n experiment_id = Column(u'experiment_id', SMALLINT(), ForeignKey('experiments.id'), nullable=False)\n id = Column(u'id', SMALLINT(), primary_key=True, nullable=False)\n name = Column(u'name', VARCHAR(length=45, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False), nullable=False)\n\n #relation definitions\n\n\n\n\n\nWhat version of the product are you using? On what operating system?\n* MySQL 5.1.47\n* archlinux\n* sqlautocode 0.6b1 (with issue27 patch)\n* sqlalchemy 0.6.5\n* python 2.7\n\n\n\nAnyone any clue why these don't show up?\n\nKenny\n```\n\nOriginal issue reported on code.google.com by `kennybil...@gmail.com` on 10 Jan 2011 at 3:56\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2015-12-02T03:31:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/31/sqlautocode/issues/31"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a900f759-31e8-49e0-6bb6-6ba31ad0e464 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E582:2B844:6E54E5:8C0EC7:6990E8C3 |
| html-safe-nonce | da74c3237742435dc532844111e21f3a895cb80e706e7cc5e55581f918faa702 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTgyOjJCODQ0OjZFNTRFNTo4QzBFQzc6Njk5MEU4QzMiLCJ2aXNpdG9yX2lkIjoiMTcwNTkwODc3MjA1NTA4MzIwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b4db029c7ff7e377bc369b8baf45ea4cc321eccc21c6934739500cc95a167391 |
| hovercard-subject-tag | issue:119859505 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/unalloc/sqlautocode/31/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9fe6be15d5995923e07464873da2113a8a3ce7457c055c1e3fc671eae1e31ded/unalloc/sqlautocode/issues/31 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9fe6be15d5995923e07464873da2113a8a3ce7457c055c1e3fc671eae1e31ded/unalloc/sqlautocode/issues/31 |
| og:image:alt | What steps will reproduce the problem? 1. With attached sql create a MySQL db 2. run sqlautocode -d mysql://localhost/dbname -o model.py What is the expected output? What do you see instead? Expect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GoogleCodeExporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/unalloc/sqlautocode git https://github.com/unalloc/sqlautocode.git |
| octolytics-dimension-user_id | 2229516 |
| octolytics-dimension-user_login | unalloc |
| octolytics-dimension-repository_id | 47234827 |
| octolytics-dimension-repository_nwo | unalloc/sqlautocode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 47234827 |
| octolytics-dimension-repository_network_root_nwo | unalloc/sqlautocode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width