title: TypeError: Additional arguments should be named <dialectname>_<argument>, got 'nullable'
body: <p>I am currently working on my flask app, its a application for book repository for final year students, where they can upload their final year projects and other relevant books for other students, so i was setting up my database and i encountered this error message here. I am new to programming and this is my first project.</p>
  <pre><code>v) C:\Users\USER\Desktop\educationhub&gt;python
  Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; from eduhub import db
  C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\__init__.py:833: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS 
  adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
    warnings.warn(FSADeprecationWarning(
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;C:\Users\USER\Desktop\educationhub\eduhub.py&quot;, line 58, in &lt;module&gt;
      class Project(db.Model):
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 67, in __init__
      super(NameMetaMixin, cls).__init__(name, bases, d)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 121, in __init__
      super(BindMetaMixin, cls).__init__(name, bases, d)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\api.py&quot;, line 76, in __init__
      _as_declarative(cls, classname, cls.__dict__)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 131, in _as_declarative
      _MapperConfig.setup_mapping(cls, classname, dict_)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 160, in setup_mapping
      cfg_cls(cls_, classname, dict_)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 190, in __init__
      self._setup_table()
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 534, in _setup_table
      cls.__table__ = table = table_cls(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 99, in __table_cls__
      return sa.Table(*args, **kwargs)
    File &quot;&lt;string&gt;&quot;, line 2, in __new__
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\deprecations.py&quot;, line 139, in warned
      return fn(*args, **kwargs)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 560, in __new__
      metadata._remove_table(name, schema)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\langhelpers.py&quot;, line 68, in __exit__
      compat.raise_(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\compat.py&quot;, line 182, in raise_
      raise exception
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 555, in __new__
      table._init(name, metadata, *args, **kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 654, in _init
      self._init_items(*args)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 118, in _init_items
      spwd(self)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\base.py&quot;, line 464, in _set_parent_with_dispatch
      self.dispatch.after_parent_attach(self, parent)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\event\attr.py&quot;, line 322, in __call__
      fn(*args, **kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 2199, in _set_table
      self.constraint = ForeignKeyConstraint(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 3324, in __init__
      Constraint.__init__(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 2890, in __init__
      self._validate_dialect_kwargs(dialect_kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\base.py&quot;, line 290, in _validate_dialect_kwargs
      raise TypeError(
  TypeError: Additional arguments should be named &lt;dialectname&gt;_&lt;argument&gt;, got 'nullable'
  &gt;&gt;&gt; from eduhub import db
  C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\__init__.py:833: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS 
  adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
    warnings.warn(FSADeprecationWarning(
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;C:\Users\USER\Desktop\educationhub\eduhub.py&quot;, line 63, in &lt;module&gt;
      class Book(db.Model):
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 67, in __init__
      super(NameMetaMixin, cls).__init__(name, bases, d)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 121, in __init__
      super(BindMetaMixin, cls).__init__(name, bases, d)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\api.py&quot;, line 76, in __init__
      _as_declarative(cls, classname, cls.__dict__)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 131, in _as_declarative
      _MapperConfig.setup_mapping(cls, classname, dict_)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 160, in setup_mapping
      cfg_cls(cls_, classname, dict_)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 190, in __init__
      self._setup_table()
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\ext\declarative\base.py&quot;, line 534, in _setup_table
      cls.__table__ = table = table_cls(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\flask_sqlalchemy\model.py&quot;, line 99, in __table_cls__
      return sa.Table(*args, **kwargs)
    File &quot;&lt;string&gt;&quot;, line 2, in __new__
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\deprecations.py&quot;, line 139, in warned
      return fn(*args, **kwargs)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 560, in __new__
      metadata._remove_table(name, schema)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\langhelpers.py&quot;, line 68, in __exit__
      compat.raise_(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\util\compat.py&quot;, line 182, in raise_
      raise exception
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 555, in __new__
      table._init(name, metadata, *args, **kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 654, in _init
      self._init_items(*args)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 118, in _init_items
      spwd(self)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\base.py&quot;, line 464, in _set_parent_with_dispatch
      self.dispatch.after_parent_attach(self, parent)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\event\attr.py&quot;, line 322, in __call__
      fn(*args, **kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 2199, in _set_table
      self.constraint = ForeignKeyConstraint(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 3324, in __init__
      Constraint.__init__(
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\schema.py&quot;, line 2890, in __init__
      self._validate_dialect_kwargs(dialect_kw)
    File &quot;C:\Users\USER\Desktop\educationhub\venv\lib\site-packages\sqlalchemy\sql\base.py&quot;, line 290, in _validate_dialect_kwargs
      raise TypeError(
  TypeError: Additional arguments should be named &lt;dialectname&gt;_&lt;argument&gt;, got 'nullable'
  &gt;&gt;&gt;  `
  
  My code 
  
  from datetime import datetime
  from flask import Flask, render_template, url_for, flash, redirect
  from flask_sqlalchemy import SQLAlchemy
  from forms import RegistrationForm, LoginForm
  
  app = Flask(__name__)
  
  app.config[&quot;SECRET_KEY&quot;] = &quot;&quot;
  app.config[&quot;SQLALCHEMY_DATABASE_URI&quot;] = 'sqlite:///site.db'
  db = SQLAlchemy(app)
  
  
  
  
  #Users Details
  class Users(db.Model):
      id = db.Column(db.Integer, primary_key=True, nullable=False)
      fname = db.Column(db.String(60), nullable=False)
      lname = db.Column(db.String(60), nullable=False)
      username = db.Column(db.String(60), unique=True, nullable=False)
      email = db.Column(db.String(120), unique=True, nullable=False)
      password = db.Column(db.String(100), nullable=False)
      education = db.relationship('Education', backref='author')
  
      book_id = db.Column(db.Integer, db.ForeignKey('book_id'), nullable=False)
      books = db.relationship('Book', backref='author', lazy=True)
  
      project_id = db.Column(db.Integer, db.ForeignKey('project_id'), nullable=False)
      projects = db.relationship('Project', backref='author', lazy=True)
  
      #Upload Books/Projects
      uploaded_books = db.Column(db.String(120), nullable=False)
      downloaded_books = db.Column(db.String(120), nullable=False)
      uploaded_projects = db.Column(db.String(120), nullable=False)
      downloaded_books = db.Column(db.String(120), nullable=False)
  
      #Users Personal Details
      aboutme = db.Column(db.String(450), nullable=False, default=&quot;No Description&quot;)
      phone = db.Column(db.Numeric(20, 0), nullable=False, default=&quot;00000000000&quot;)
      location = db.Column(db.String(60), nullable=False, default=&quot;Unknown City&quot;)
  
      # User Image Filename
      image_file = db.Column(db.String(120), nullable=False, default=&quot;default.jpg&quot;)
  
      def __repr__(self):
          return f&quot;&quot;&quot;&quot;Users
          '{self.fname}', 
          '{self.lname}', 
          '{self.username}', 
          '{self.email}',
          '{self.uploaded_books}',
          '{self.downloaded_books}',
          '{self.uploaded_projects}',
          '{self.downloaded_projects}',
          '{self.image_file}'&quot;&quot;&quot;
  
  
  
  #Educational Books
  class Book(db.Model):
      id = db.Column(db.Integer, primary_key=True, nullable=False)
      book_title = db.Column(db.String(120), nullable=False)
      author = db.Column(db.String(60), nullable=False, default=&quot;Author Name&quot;)
      isdn = db.Column(db.Numeric(20, 0), unique=True, nullable=False, default=&quot;0000000000000&quot;)
      filename = db.Column(db.String(120), nullable=False, default=&quot;default.pdf&quot;)
      image = db.Column(db.String(120), nullable=False, default=&quot;default.jpg&quot;)
      date_posted = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
      book_description = db.Column(db.String(400), nullable=False, default=&quot;About Book&quot;)
      user_id = db.Column(db.Integer, db.ForeignKey('user.id', nullable=False))
  
      def __repr__(self):
          return f&quot;&quot;&quot;Book
          '{self.book_title}', 
          '{self.author}',
          '{self.isdn}',
          '{self.filename}',
          '{self.image}',
          '{self.date_posted}', 
          '{self.book_description}'&quot;&quot;&quot;
  
  
  
  
  #Final Year Projects
  class Project(db.Model):
      id = db.Column(db.Integer, primary_key=True, nullable=False)
      project_title = db.Column(db.String(60), nullable=False)
      project_author = db.Column(db.String(60),nullable=False,default=&quot;Written By&quot;)
      filename = db.Column(db.String(120), nullable=False, default=&quot;default.pdf&quot;)
      date_posted = db.Column(db.DateTime,nullable=False,default=datatime.utcnow)
      project_description = db.Column(db.String(400),nullable=False,default=&quot;About Project&quot;)
      user_id = db.Column(db.Integer, db.ForeignKey('user.id', nullable=False))
  
      def __repr__(self):
          return f&quot;&quot;&quot;Project
          '{self.project_title}', 
          '{self.project_author}', 
          '{self.filename}',
          '{self.date_posted},'
          '{self.project_description}'&quot;&quot;&quot;
  
  
  
  #Edcational Qualification
  class Education(db.Model):
      id = db.Column(db.Integer, primary_key=True, nullable=False)
      school = db.Column(db.String(100), nullable=True)
      institution = db.Column(db.String(120),nullable=False,default=&quot;University&quot;)
      course = db.Column(db.String(60), nullable=False, default=&quot;Economics&quot;)
      fromDate = db.Column(db.String(5), nullable=True)
      toDate = db.Column(db.Numeric(5, 0), nullable=True)
      description = db.Column(db.String(160), nullable=True)
      user_id = db.Column(db.Integer, db.ForeignKey('user.id', nullable=False))
  
      def __repr__(self):
          return f&quot;&quot;&quot;Education
          '{self.school}', 
          '{self.institution}', 
          '{self.course}', 
          '{self.fromDate}', 
          '{self.toDate}', 
          '{self.description}'&quot;&quot;&quot;
  
  
  @app.route(&quot;/&quot;)
  @app.route(&quot;/home&quot;)
  def home():
      return render_template(&quot;home.html&quot;)
  
  
  @app.route(&quot;/about&quot;)
  def about():
      return render_template(&quot;about.html&quot;)
  
  
  @app.route(&quot;/register&quot;, methods=[&quot;GET&quot;, &quot;POST&quot;])
  def register():
      form = RegistrationForm()
      if form.validate_on_submit():
          flash(f&quot;Account created for { form.username.data }!&quot; &quot;success&quot;)
          return redirect(url_for(&quot;home&quot;))
      return render_template(&quot;register.html&quot;, title=&quot;Register&quot;, form=form)
  
  
  @app.route(&quot;/login&quot;, methods=[&quot;GET&quot;, &quot;POST&quot;])
  def login():
      form = LoginForm()
      if form.validate_on_submit():
          if form.email.data == &quot;admin@blog.com&quot; and form.password.data == &quot;password&quot;:
              flash(&quot;You have been logged in!&quot;, &quot;success&quot;)
              return redirect(url_for(&quot;home&quot;))
          else:
              flash(&quot;Login Unsucessful. Please Check username and password&quot;,
                    &quot;danger&quot;)
      return render_template(&quot;login.html&quot;, title=&quot;Login&quot;, form=form)
  
  
  if __name__ == &quot;__main__&quot;:
      app.run(debug=True)
  
      
  
      
  </code></pre>