Body: <p>I created a new entity for my extension. These are the steps i followed:</p>
  <ol>
  <li>Generated the skeletal files using civix generate:entity command</li>
  <li>Edited the XML schema definitions as i needed.</li>
  <li>Generate your DAO and SQL files using civix generate:entity-boilerplate command.</li>
  <li>Generated the database upgrader.</li>
  </ol>
  <p>After following these steps i found the 'auto_install.sql' has the sql query to create the table in DB. But when i uninstall the extension and reinstall it again it didn't created the table.</p>
  <p>I even executed the sql query manually it works fine but when i reinstall it, it doesn't create the table.. what could be the reason?</p>
  <p>Thank you very much in advance!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T17:48:35.590Z
Comments.Text: Can you check extension has Upgrader.php and Upgrader/Base.php?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T17:51:32.157Z
Comments.Text: @PradeepNayak yes it has. do i need to do any modification in it?
Comments.UserDisplayName: safron
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T17:52:30.537Z
Comments.Text: Its under correct directory?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T17:53:36.297Z
Comments.Text: yes..but i didn't define any functions on it yet
Comments.UserDisplayName: safron
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T18:15:24.680Z
Comments.Text: @PradeepNayak could you please help me with this?
Comments.UserDisplayName: safron
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T18:32:15.247Z
Comments.Text: What is set as 'namespace' in your extension info.xml and what is the full path of Upgrader.php? Are both same? Can you check the permission of sql/auto_install.sql
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-19T18:36:10.680Z
Comments.Text: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/111982/discussion-between-safron-and-pradeep-nayak).
Comments.UserDisplayName: safron
Tags: <civicrm-entity>
Title: Civi entity didn't automatically create the table in database
ThreadText: # Civi entity didn't automatically create the table in database
  
  (Asked by: username_0 on 2020-08-19)
  
  I created a new entity for my extension. These are the steps i followed:
  
  1. Generated the skeletal files using civix generate:entity command
  2. Edited the XML schema definitions as i needed.
  3. Generate your DAO and SQL files using civix generate:entity-boilerplate command.
  4. Generated the database upgrader.
  
  After following these steps i found the 'auto\_install.sql' has the sql query to create the table in DB. But when i uninstall the extension and reinstall it again it didn't created the table.
  
  I even executed the sql query manually it works fine but when i reinstall it, it doesn't create the table.. what could be the reason?
  
  Thank you very much in advance!
  
  **Tags:** civicrm-entity
  
  > **Comments:**
  > **username_1**: Can you check extension has Upgrader.php and Upgrader/Base.php?  
  > **username_0**: @username_1 yes it has. do i need to do any modification in it?  
  > **username_1**: Its under correct directory?  
  > **username_0**: yes..but i didn't define any functions on it yet  
  > **username_0**: @username_1 could you please help me with this?  
  > **username_1**: What is set as 'namespace' in your extension info.xml and what is the full path of Upgrader.php? Are both same? Can you check the permission of sql/auto_install.sql  
  > **username_0**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/111982/discussion-between-username_0-and-username_1).  
  
  ---
  
  ## 0 answers
  
  