[PR #311] [CLOSED] docs: Fix incorrect database initialization command #281

Closed
opened 2026-03-02 23:34:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/311
Author: @oxcodexo
Created: 11/22/2025
Status: Closed

Base: mainHead: docs/fix-db-init-command


📝 Commits (1)

  • f0d0920 docs: fix incorrect database initialization command" -m "Update installation, configuration, and troubleshooting guides to reference the correct function name 'init_database' instead of 'initialize_database'. This fixes an ImportError that occurred when following the installation instructions.

📊 Changes

3 files changed (+4 additions, -4 deletions)

View changed files

📝 docs-site/docs/getting-started/configuration.md (+1 -1)
📝 docs-site/docs/getting-started/installation.md (+2 -2)
📝 docs-site/docs/guides/troubleshooting.md (+1 -1)

📄 Description

Pull Request

📝 Description

This PR corrects the database initialization command in the installation and configuration guides. The documentation previously referenced initialize_database, which caused an ImportError because the actual function in services/database.py is named init_database.

Changes:

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI changes
  • ♻️ Code refactoring
  • Performance improvements
  • 🧪 Test additions/updates

Fixes ImportError: cannot import name 'initialize_database' from 'services.database' during setup.

🧪 Testing

  • Backend tests pass
  • Frontend tests pass
  • Manual testing completed
  • Cross-browser testing (if applicable)
  • Mobile testing (if applicable)

Verification:
Ran the corrected command python -c "from services.database import init_database; init_database()" and confirmed it successfully initializes the database without errors.

📸 Screenshots (if applicable)

N/A

🏷️ Component/Feature

Which component or feature is affected?

  • Blog Writer
  • SEO Dashboard
  • Content Planning
  • Facebook Writer
  • LinkedIn Writer
  • Onboarding
  • Authentication
  • API
  • Database
  • GSC Integration
  • Subscription System
  • Monitoring/Billing
  • Documentation
  • Other: _______________

📋 Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

ALwrity-Specific Checklist

  • API endpoints follow RESTful conventions
  • AI service integrations handle rate limits and errors gracefully
  • Content generation includes proper validation and sanitization
  • Database migrations are included if schema changes are made
  • Environment variables are documented in env_template.txt
  • Security considerations have been addressed
  • Performance impact has been considered
  • User experience is consistent with existing features

🔍 Code Quality

  • Code is properly formatted
  • No console.log statements left in production code
  • Error handling is implemented where needed
  • Performance considerations have been addressed
  • Security considerations have been addressed

📚 Documentation

  • README updated (if needed)
  • API documentation updated (if needed)
  • Code comments added for complex logic
  • Changelog updated (if applicable)

🚀 Deployment Notes

None.

🔗 Additional Context

This was a blocking issue for new installations.

👥 Reviewers

Tag specific reviewers if needed:
@AJaySi @uniqueumesh @DikshaDisciplines


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/311 **Author:** [@oxcodexo](https://github.com/oxcodexo) **Created:** 11/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `docs/fix-db-init-command` --- ### 📝 Commits (1) - [`f0d0920`](https://github.com/AJaySi/ALwrity/commit/f0d092014402b80ae7e9c4c8d2b273c03b61f66b) docs: fix incorrect database initialization command" -m "Update installation, configuration, and troubleshooting guides to reference the correct function name 'init_database' instead of 'initialize_database'. This fixes an ImportError that occurred when following the installation instructions. ### 📊 Changes **3 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs-site/docs/getting-started/configuration.md` (+1 -1) 📝 `docs-site/docs/getting-started/installation.md` (+2 -2) 📝 `docs-site/docs/guides/troubleshooting.md` (+1 -1) </details> ### 📄 Description # Pull Request ## 📝 Description This PR corrects the database initialization command in the installation and configuration guides. The documentation previously referenced `initialize_database`, which caused an `ImportError` because the actual function in [services/database.py](cci:7://file:///home/oxcodexo/Desktop/projects/ai-blogger/ai-writy/backend/services/database.py:0:0-0:0) is named [init_database](cci:1://file:///home/oxcodexo/Desktop/projects/ai-blogger/ai-writy/backend/services/database.py:62:0-79:13). **Changes:** * Updated [docs/getting-started/installation.md](cci:7://file:///home/oxcodexo/Desktop/projects/ai-blogger/ai-writy/docs-site/docs/getting-started/installation.md:0:0-0:0) * Updated [docs/getting-started/configuration.md](cci:7://file:///home/oxcodexo/Desktop/projects/ai-blogger/ai-writy/docs-site/docs/getting-started/configuration.md:0:0-0:0) * Updated [docs/guides/troubleshooting.md](cci:7://file:///home/oxcodexo/Desktop/projects/ai-blogger/ai-writy/docs-site/docs/guides/troubleshooting.md:0:0-0:0) ## 🔄 Type of Change - [x] 🐛 Bug fix (non-breaking change which fixes an issue) - [ ] ✨ New feature (non-breaking change which adds functionality) - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] 📚 Documentation update - [ ] 🎨 Style/UI changes - [ ] ♻️ Code refactoring - [ ] ⚡ Performance improvements - [ ] 🧪 Test additions/updates ## 🎯 Related Issues Fixes `ImportError: cannot import name 'initialize_database' from 'services.database'` during setup. ## 🧪 Testing - [ ] Backend tests pass - [ ] Frontend tests pass - [x] Manual testing completed - [ ] Cross-browser testing (if applicable) - [ ] Mobile testing (if applicable) **Verification:** Ran the corrected command `python -c "from services.database import init_database; init_database()"` and confirmed it successfully initializes the database without errors. ## 📸 Screenshots (if applicable) N/A ## 🏷️ Component/Feature Which component or feature is affected? - [ ] Blog Writer - [ ] SEO Dashboard - [ ] Content Planning - [ ] Facebook Writer - [ ] LinkedIn Writer - [ ] Onboarding - [ ] Authentication - [ ] API - [x] Database - [ ] GSC Integration - [ ] Subscription System - [ ] Monitoring/Billing - [x] Documentation - [ ] Other: _______________ ## 📋 Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published ### ALwrity-Specific Checklist - [ ] API endpoints follow RESTful conventions - [ ] AI service integrations handle rate limits and errors gracefully - [ ] Content generation includes proper validation and sanitization - [ ] Database migrations are included if schema changes are made - [ ] Environment variables are documented in env_template.txt - [ ] Security considerations have been addressed - [ ] Performance impact has been considered - [x] User experience is consistent with existing features ## 🔍 Code Quality - [x] Code is properly formatted - [x] No console.log statements left in production code - [ ] Error handling is implemented where needed - [ ] Performance considerations have been addressed - [ ] Security considerations have been addressed ## 📚 Documentation - [ ] README updated (if needed) - [ ] API documentation updated (if needed) - [ ] Code comments added for complex logic - [ ] Changelog updated (if applicable) ## 🚀 Deployment Notes None. ## 🔗 Additional Context This was a blocking issue for new installations. ## 👥 Reviewers Tag specific reviewers if needed: @AJaySi @uniqueumesh @DikshaDisciplines --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:34:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#281
No description provided.